Fix AFB_SESSION_CREATE behaviour
[src/app-framework-binder.git] / src / session.h
index c272245..af07410 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2016 IoT.bzh
+ * Copyright (C) 2016 "IoT.bzh"
  * Author: José Bollo <jose.bollo@iot.bzh>
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -23,6 +23,7 @@ struct AFB_clientCtx;
 struct afb_event_listener_itf
 {
        void (*send)(void *closure, const char *event, struct json_object *object);
+       int (*expects)(void *closure, const char *event);
 };
 
 struct afb_event_listener
@@ -47,6 +48,8 @@ extern void ctxTokenNew (struct AFB_clientCtx *clientCtx);
 
 extern const char *ctxClientGetUuid (struct AFB_clientCtx *clientCtx);
 extern const char *ctxClientGetToken (struct AFB_clientCtx *clientCtx);
+extern unsigned ctxClientGetLOA (struct AFB_clientCtx *clientCtx);
+extern void ctxClientSetLOA (struct AFB_clientCtx *clientCtx, unsigned loa);
 
 extern void *ctxClientValueGet(struct AFB_clientCtx *clientCtx, int index);
 extern void ctxClientValueSet(struct AFB_clientCtx *clientCtx, int index, void *value, void (*free_value)(void*));