IoTivity-Lite
oc_push.h File Reference
#include <stdio.h>
#include "oc_config.h"
#include "oc_helpers.h"
#include "oc_rep.h"
#include "oc_ri.h"
#include "oc_endpoint.h"
#include "util/oc_memb.h"
#include "util/oc_process.h"

Data Structures

struct  oc_pushd_resource_rep
 object used to store Resource pushed to "oic.r.pushreceiver:receivers[i].receiveruri" More...
 

Macros

#define PUSHCONFIG_RESOURCE_NAME   "Push Configuration"
 
#define PUSHCONFIG_RESOURCE_PATH   "/pushconfig"
 
#define PUSHCONFIG_RESOURCE_TYPE   "oic.r.pushconfiguration"
 
#define PUSHRECEIVERS_RESOURCE_NAME   "Push Receiver Configuration"
 
#define PUSHRECEIVERS_RESOURCE_PATH   "/pushreceivers"
 
#define PUSHRECEIVERS_RESOURCE_TYPE   "oic.r.pushreceiver"
 

Typedefs

typedef void(* oc_on_push_arrived_t) (oc_pushd_resource_rep_t *)
 callback function called whenever new push arrives More...
 
typedef struct oc_pushd_resource_rep oc_pushd_resource_rep_t
 object used to store Resource pushed to "oic.r.pushreceiver:receivers[i].receiveruri" More...
 

Functions

void oc_print_pushd_resource (const oc_rep_t *payload)
 print payload of Resource in user friendly format More...
 
void oc_resource_state_changed (const char *uri, size_t uri_len, size_t device_index)
 application should call this function whenever the contents of pushable Resource is updated, or Push Notification will not work. More...
 
void oc_set_on_push_arrived (oc_on_push_arrived_t func)
 set callback function called whenever new push arrives More...
 

Typedef Documentation

◆ oc_on_push_arrived_t

typedef void(* oc_on_push_arrived_t) (oc_pushd_resource_rep_t *)

callback function called whenever new push arrives

◆ oc_pushd_resource_rep_t

object used to store Resource pushed to "oic.r.pushreceiver:receivers[i].receiveruri"

Function Documentation

◆ oc_print_pushd_resource()

void oc_print_pushd_resource ( const oc_rep_t *  payload)

print payload of Resource in user friendly format

Parameters
[in]payloadpointer to the payload to be printed

◆ oc_resource_state_changed()

void oc_resource_state_changed ( const char *  uri,
size_t  uri_len,
size_t  device_index 
)

application should call this function whenever the contents of pushable Resource is updated, or Push Notification will not work.

Parameters
[in]uripath of pushable Resource whose contents is just updated
[in]uri_lenlength of uri
[in]device_indexindex of Device that updated pushable Resource belongs to

◆ oc_set_on_push_arrived()

void oc_set_on_push_arrived ( oc_on_push_arrived_t  func)

set callback function called whenever new push arrives

Parameters
[in]funcfunction name