summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2019-12-13 12:24:39 +0100
committerJosé Bollo <jose.bollo@iot.bzh>2019-12-13 12:24:39 +0100
commit0d65d54ba63508c0ef545d02e94d5702f9c8ecb3 (patch)
tree5c339ff2fe20337b8847d4065c140fddef015ab0 /include
parentaa5b928d4ba30da2a9f0403fa0f0f3e379cec439 (diff)
In order to separate applications for cookies and private data the framework uses the component nss-localuser to forge specific hostnames. This commit takes it into account by allowing to specify the hostname to contact at init. Bug-AGL: SPEC-3014 Change-Id: I13ef507b071bd75bc781d8abe8203da0beac1d7f Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'include')
-rw-r--r--include/libhomescreen.hpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/include/libhomescreen.hpp b/include/libhomescreen.hpp
index e51e01c..417ccdc 100644
--- a/include/libhomescreen.hpp
+++ b/include/libhomescreen.hpp
@@ -58,6 +58,7 @@ public:
static const std::vector<std::string> event_list;
/* Method */
+ int init(const char *hostname, const int port, const char *token);
int init(const int port, const std::string& token);
int tapShortcut(const char* application_id);
@@ -86,6 +87,7 @@ public:
private:
int initialize_websocket();
+ int initialize_websocket(const char *hostname, const int port, const char *token);
void (*onEvent)(const std::string& event, struct json_object* event_contents);
void (*onReply)(struct json_object* reply);
@@ -96,9 +98,6 @@ private:
sd_event* mploop;
std::string muri;
- int mport = 2000;
- std::string mtoken = "hs";
-
std::map<EventType, handler_func> handlers;
public: