HomeScreenBinding
Functions | Variables
libhomescreen.cpp File Reference
#include <stdarg.h>
#include <sys/socket.h>
#include <iostream>
#include <algorithm>
#include <errno.h>
#include <cassert>
#include <cctype>
#include <cerrno>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <libhomescreen.hpp>
#include "hmi-debug.h"

Go to the source code of this file.

Functions

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)
 

Variables

static const char API [] = "homescreen"
 
static const char ApplicationId [] = "application_id"
 

Function Documentation

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

Definition at line 74 of file libhomescreen.cpp.

75 {
76  /* LibHomeScreen is not called from other process */
77 }
static void _on_event_static ( void *  closure,
const char *  event,
struct afb_wsj1_msg *  msg 
)
static

Definition at line 79 of file libhomescreen.cpp.

80 {
81  static_cast<LibHomeScreen*>(closure)->on_event(NULL,event,msg);
82 }
static void _on_hangup_static ( void *  closure,
struct afb_wsj1 *  wsj 
)
static

websocket

Definition at line 69 of file libhomescreen.cpp.

70 {
71  static_cast<LibHomeScreen*>(closure)->on_hangup(NULL,wsj);
72 }
static void _on_reply_static ( void *  closure,
struct afb_wsj1_msg *  msg 
)
static

Definition at line 84 of file libhomescreen.cpp.

85 {
86  static_cast<LibHomeScreen*>(closure)->on_reply(NULL,msg);
87 }
static bool has_verb ( const string &  verb)
static

Definition at line 705 of file libhomescreen.cpp.

706 {
707  HMI_DEBUG("libhomescreen","verb is %s", verb.c_str());
708  if(find(LibHomeScreen::api_list.begin(), LibHomeScreen::api_list.end(), verb) != LibHomeScreen::api_list.end())
709  return true;
710  else
711  return false;
712 }
#define HMI_DEBUG(prefix, args,...)
Definition: hmi-debug.h:42
static const std::vector< std::string > api_list

Variable Documentation

const char API[] = "homescreen"
static

Definition at line 35 of file libhomescreen.cpp.

const char ApplicationId[] = "application_id"
static

Definition at line 36 of file libhomescreen.cpp.