IoTivity-Lite
Asserting roles

Asserting roles support functions. More...

Typedefs

typedef struct oc_role_t oc_role_t
 

Functions

void oc_assert_all_roles (const 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, const 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 ( const 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,
const oc_endpoint_t endpoint,
oc_response_handler_t  handler,
void *  user_data 
)

assert the specific role

Parameters
rolethe role (cannot be NULL)
authoritythe authority
endpointendpoint identifying the connection (cannot be NULL)
handlerthe response handler (cannot be NULL)
user_datathe user data to be conveyed to the response handler
Returns
true request was initialized and sent
false otherwise

◆ 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_assertset to true to enable automatic role assertion

◆ oc_get_all_roles()

oc_role_t* oc_get_all_roles ( void  )

retrieve all roles

Returns
oc_role_t*