#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.
|
#define | ELOG(args, ...) _ELOG(__FUNCTION__,__LINE__,args,##__VA_ARGS__) |
|
#define | DLOG(args, ...) _DLOG(__FUNCTION__,__LINE__,args,##__VA_ARGS__) |
|
|
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) |
|
|
static const char | API [] = "homescreen" |
|
◆ DLOG
#define DLOG |
( |
|
args, |
|
|
|
... |
|
) |
| _DLOG(__FUNCTION__,__LINE__,args,##__VA_ARGS__) |
◆ ELOG
#define ELOG |
( |
|
args, |
|
|
|
... |
|
) |
| _ELOG(__FUNCTION__,__LINE__,args,##__VA_ARGS__) |
◆ _DLOG()
static void _DLOG |
( |
const char * |
func, |
|
|
const int |
line, |
|
|
const char * |
log, |
|
|
|
... |
|
) |
| |
|
static |
Definition at line 545 of file libhomescreen.cpp.
550 if (log == NULL || vasprintf(&message, log, args) < 0)
552 cout <<
"[libhomescreen DEBUG]" << func <<
"(" << line <<
"):" << message << endl;
◆ _ELOG()
static void _ELOG |
( |
const char * |
func, |
|
|
const int |
line, |
|
|
const char * |
log, |
|
|
|
... |
|
) |
| |
|
static |
Definition at line 533 of file libhomescreen.cpp.
538 if (log == NULL || vasprintf(&message, log, args) < 0)
540 cout <<
"[libhomescreen ERROR]" << func <<
"(" << line <<
"):" << message << endl;
◆ _on_call_static()
static void _on_call_static |
( |
void * |
closure, |
|
|
const char * |
api, |
|
|
const char * |
verb, |
|
|
struct afb_wsj1_msg * |
msg |
|
) |
| |
|
static |
◆ _on_event_static()
static void _on_event_static |
( |
void * |
closure, |
|
|
const char * |
event, |
|
|
struct afb_wsj1_msg * |
msg |
|
) |
| |
|
static |
◆ _on_hangup_static()
static void _on_hangup_static |
( |
void * |
closure, |
|
|
struct afb_wsj1 * |
wsj |
|
) |
| |
|
static |
◆ _on_reply_static()
static void _on_reply_static |
( |
void * |
closure, |
|
|
struct afb_wsj1_msg * |
msg |
|
) |
| |
|
static |
◆ event_loop_run()
static void* event_loop_run |
( |
void * |
args | ) |
|
|
static |
Definition at line 204 of file libhomescreen.cpp.
206 struct sd_event* loop = (
struct sd_event*)(args);
207 DLOG(
"start eventloop");
209 sd_event_run(loop, 30000000);
◆ has_verb()
static bool has_verb |
( |
const string & |
verb | ) |
|
|
static |
Definition at line 557 of file libhomescreen.cpp.
559 DLOG(
"verb is %s", verb.c_str());
static const std::vector< std::string > api_list
◆ API
const char API[] = "homescreen" |
|
static |