*/
HS_Client::HS_Client(afb_req_t request, std::string id) : my_id(id)
{
- AFB_DEBUG("called.");
my_event = afb_api_make_event(request->api, id.c_str());
}
*/
HS_Client::~HS_Client()
{
- AFB_DEBUG("called.");
afb_event_unref(my_event);
}
*/
int HS_Client::subscribe(afb_req_t request)
{
- AFB_DEBUG(" called.");
int ret = 0;
const char *value = afb_req_value(request, _event);
if(value) {
*/
int HS_Client::unsubscribe(afb_req_t request)
{
- AFB_DEBUG(" called.");
int ret = 0;
const char *value = afb_req_value(request, _event);
if(value) {
*/
int HS_Client::hideWindow(afb_req_t request)
{
- AFB_DEBUG(" called.");
std::string req_appid = std::move(get_application_id(request));
if(req_appid.empty()) {
AFB_WARNING("can't get application identifier");
*/
int HS_Client::showNotification(afb_req_t request)
{
- AFB_DEBUG(" called.");
int ret = 0;
const char *value = afb_req_value(request, _text);
if(value) {
*/
int HS_Client::showInformation(afb_req_t request)
{
- AFB_DEBUG(" called.");
int ret = 0;
const char *value = afb_req_value(request, _info);
if(value) {
*/
int HS_Client::handleRequest(afb_req_t request, const char *verb)
{
- AFB_DEBUG("called.");
if((strcasecmp(verb, "subscribe") && strcasecmp(verb, "unsubscribe")) && !checkEvent(verb))
return 0;
if(!checkEvent(event))
return 0;
- AFB_INFO("called, event=%s.",event);
+ AFB_INFO("called, event=%s.", event);
struct json_object* push_obj = json_object_new_object();
hs_add_object_to_json_object_str( push_obj, 4, _application_id, my_id.c_str(), _type, event);
if(param != nullptr)