IoTivity-Lite
Asserting roles

Asserting roles support functions. More...

Typedefs

typedef struct oc_role_t oc_role_t
 

Functions

void oc_assert_all_roles (oc_endpoint_t *endpoint, oc_response_handler_t handler, void *user_data)
 assert all the roles for a specific endpoint More...
 
bool oc_assert_role (const char *role, const char *authority, oc_endpoint_t *endpoint, oc_response_handler_t handler, void *user_data)
 assert the specific role More...
 
void oc_auto_assert_roles (bool auto_assert)
 set automatic role assertion (e.g. More...
 
oc_role_t * oc_get_all_roles (void)
 retrieve all roles More...
 

Detailed Description

Asserting roles support functions.

Function Documentation

◆ oc_assert_all_roles()

void oc_assert_all_roles ( oc_endpoint_t endpoint,
oc_response_handler_t  handler,
void *  user_data 
)

assert all the roles for a specific endpoint

Parameters
endpointidentifying the connection
handlerthe response handler
user_datathe user data to be conveyed to the response handler

◆ oc_assert_role()

bool oc_assert_role ( const char *  role,
const char *  authority,
oc_endpoint_t endpoint,
oc_response_handler_t  handler,
void *  user_data 
)

assert the specific role

Parameters
rolethe role
authoritythe authority
endpointendpoint identifying the connection
handlerthe response handler
user_datathe user data to be conveyed to the response handler
Returns
true
false

◆ oc_auto_assert_roles()

void oc_auto_assert_roles ( bool  auto_assert)

set automatic role assertion (e.g.

for all endpoints with a connection)

Parameters
auto_assert

◆ oc_get_all_roles()

oc_role_t* oc_get_all_roles ( void  )

retrieve all roles

Returns
oc_role_t*