From e0163d2b8daae98ced81f4bc737998c00858e771 Mon Sep 17 00:00:00 2001 From: zheng_wenlong Date: Fri, 29 Sep 2017 20:42:53 +0900 Subject: Add agl-service-homescreen-2017 Add a new binding agl-service-homescreen-2017 for homescreen-2017. There is a gles sample how to use this binding in sample/simple-egl. A image about this see JIRA SPEC-871. [PatchSets2] Use aglwgt make package. Change-Id: I9ae89188f9eb2de4c98ec8baa2f05fccca8b2372 Signed-off-by: zheng_wenlong --- doc/api-ref/html/d0/d8a/libhomescreen_8cpp.html | 549 ++++++++++++++++++++++++ 1 file changed, 549 insertions(+) create mode 100644 doc/api-ref/html/d0/d8a/libhomescreen_8cpp.html (limited to 'doc/api-ref/html/d0/d8a/libhomescreen_8cpp.html') diff --git a/doc/api-ref/html/d0/d8a/libhomescreen_8cpp.html b/doc/api-ref/html/d0/d8a/libhomescreen_8cpp.html new file mode 100644 index 0000000..0c33842 --- /dev/null +++ b/doc/api-ref/html/d0/d8a/libhomescreen_8cpp.html @@ -0,0 +1,549 @@ + + + + + + + +HomeScreenBinding: libhomescreen.cpp File Reference + + + + + + + + + +
+
+ + + + + + +
+
HomeScreenBinding +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
libhomescreen.cpp File Reference
+
+
+
#include <stdarg.h>
+#include <sys/socket.h>
+#include <iostream>
+#include <algorithm>
+#include <thread>
+#include <errno.h>
+#include <cassert>
+#include <cctype>
+#include <cerrno>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+#include <libhomescreen.hpp>
+
+

Go to the source code of this file.

+ + + + + + +

+Macros

#define ELOG(args, ...)   _ELOG(__FUNCTION__,__LINE__,args,##__VA_ARGS__)
 
#define DLOG(args, ...)   _DLOG(__FUNCTION__,__LINE__,args,##__VA_ARGS__)
 
+ + + + + + + + + + + + + + + + + +

+Functions

static void _DLOG (const char *func, const int line, const char *log,...)
 
static void _ELOG (const char *func, const int line, const char *log,...)
 
static bool has_verb (const string &verb)
 
static void _on_hangup_static (void *closure, struct afb_wsj1 *wsj)
 
static void _on_call_static (void *closure, const char *api, const char *verb, struct afb_wsj1_msg *msg)
 
static void _on_event_static (void *closure, const char *event, struct afb_wsj1_msg *msg)
 
static void _on_reply_static (void *closure, struct afb_wsj1_msg *msg)
 
static void * event_loop_run (void *args)
 
+ + + +

+Variables

static const char API [] = "homescreen"
 
+

Macro Definition Documentation

+ +

◆ DLOG

+ +
+
+ + + + + + + + + + + + + + + + + + +
#define DLOG( args,
 ... 
)   _DLOG(__FUNCTION__,__LINE__,args,##__VA_ARGS__)
+
+ +

Definition at line 33 of file libhomescreen.cpp.

+ +
+
+ +

◆ ELOG

+ +
+
+ + + + + + + + + + + + + + + + + + +
#define ELOG( args,
 ... 
)   _ELOG(__FUNCTION__,__LINE__,args,##__VA_ARGS__)
+
+ +

Definition at line 32 of file libhomescreen.cpp.

+ +
+
+

Function Documentation

+ +

◆ _DLOG()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static void _DLOG (const char * func,
const int line,
const char * log,
 ... 
)
+
+static
+
+ +

Definition at line 545 of file libhomescreen.cpp.

+
546 {
547  char *message;
548  va_list args;
549  va_start(args, log);
550  if (log == NULL || vasprintf(&message, log, args) < 0)
551  message = NULL;
552  cout << "[libhomescreen DEBUG]" << func << "(" << line << "):" << message << endl;
553  va_end(args);
554  free(message);
555 }
+
+
+ +

◆ _ELOG()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static void _ELOG (const char * func,
const int line,
const char * log,
 ... 
)
+
+static
+
+ +

Definition at line 533 of file libhomescreen.cpp.

+
534 {
535  char *message;
536  va_list args;
537  va_start(args, log);
538  if (log == NULL || vasprintf(&message, log, args) < 0)
539  message = NULL;
540  cout << "[libhomescreen ERROR]" << func << "(" << line << "):" << message << endl;
541  va_end(args);
542  free(message);
543 }
+
+
+ +

◆ _on_call_static()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static void _on_call_static (void * closure,
const char * api,
const char * verb,
struct afb_wsj1_msg * msg 
)
+
+static
+
+ +

Definition at line 66 of file libhomescreen.cpp.

+
67 {
68  /* LibHomeScreen is not called from other process */
69 }
+
+
+ +

◆ _on_event_static()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
static void _on_event_static (void * closure,
const char * event,
struct afb_wsj1_msg * msg 
)
+
+static
+
+ +

Definition at line 71 of file libhomescreen.cpp.

+
72 {
73  static_cast<LibHomeScreen*>(closure)->on_event(NULL,event,msg);
74 }
+ +
+
+
+ +

◆ _on_hangup_static()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
static void _on_hangup_static (void * closure,
struct afb_wsj1 * wsj 
)
+
+static
+
+

websocket

+ +

Definition at line 61 of file libhomescreen.cpp.

+
62 {
63  static_cast<LibHomeScreen*>(closure)->on_hangup(NULL,wsj);
64 }
+
+
+
+ +

◆ _on_reply_static()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
static void _on_reply_static (void * closure,
struct afb_wsj1_msg * msg 
)
+
+static
+
+ +

Definition at line 76 of file libhomescreen.cpp.

+
77 {
78  static_cast<LibHomeScreen*>(closure)->on_reply(NULL,msg);
79 }
+
+
+
+ +

◆ event_loop_run()

+ +
+
+ + + + + +
+ + + + + + + + +
static void* event_loop_run (void * args)
+
+static
+
+ +

Definition at line 204 of file libhomescreen.cpp.

+
205 {
206  struct sd_event* loop = (struct sd_event*)(args);
207  DLOG("start eventloop");
208  for(;;)
209  sd_event_run(loop, 30000000);
210 }
#define DLOG(args,...)
+
+
+
+ +

◆ has_verb()

+ +
+
+ + + + + +
+ + + + + + + + +
static bool has_verb (const string & verb)
+
+static
+
+ +

Definition at line 557 of file libhomescreen.cpp.

+
558 {
559  DLOG("verb is %s", verb.c_str());
560  if(find(LibHomeScreen::api_list.begin(), LibHomeScreen::api_list.end(), verb) != LibHomeScreen::api_list.end())
561  return true;
562  else
563  return false;
564 }
#define DLOG(args,...)
+
static const std::vector< std::string > api_list
+
+
+
+

Variable Documentation

+ +

◆ API

+ +
+
+ + + + + +
+ + + + +
const char API[] = "homescreen"
+
+static
+
+ +

Definition at line 40 of file libhomescreen.cpp.

+ +
+
+
+ + + + -- cgit 1.2.3-korg