Soletta™ Framework
Framework for making IoT devices

Full online documentation | C API Index
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Functions
sol-oic-client.h File Reference

Routines to create clients talking the OIC protocol. More...

#include <stdbool.h>
#include <stdint.h>
#include <sol-coap.h>
#include <sol-network.h>
#include <sol-str-slice.h>
#include <sol-vector.h>
#include "sol-oic.h"

Go to the source code of this file.

Data Structures

struct  sol_oic_resource
 Structure defining an OIC resource. More...
 

Macros

#define SOL_OIC_RESOURCE_API_VERSION   (1)
 

Typedefs

typedef struct sol_oic_client sol_oic_client
 Opaque handler for an OIC client instance. More...
 
typedef struct sol_oic_pending sol_oic_pending
 Represents a pending OIC client call. More...
 
typedef struct sol_oic_resource sol_oic_resource
 Structure defining an OIC resource. More...
 

Functions

void sol_oic_client_del (struct sol_oic_client *client)
 Delete client. More...
 
struct sol_oic_pendingsol_oic_client_find_resources (struct sol_oic_client *client, struct sol_network_link_addr *addr, const char *resource_type, const char *resource_interface, bool(*resource_found_cb)(void *data, struct sol_oic_client *cli, struct sol_oic_resource *res), const void *data)
 Send a discovevery packet to find resources. More...
 
struct sol_oic_pendingsol_oic_client_get_platform_info (struct sol_oic_client *client, struct sol_oic_resource *resource, void(*info_received_cb)(void *data, struct sol_oic_client *cli, const struct sol_oic_platform_info *info), const void *data)
 Retrieve platform information. More...
 
struct sol_oic_pendingsol_oic_client_get_platform_info_by_addr (struct sol_oic_client *client, struct sol_network_link_addr *addr, void(*info_received_cb)(void *data, struct sol_oic_client *cli, const struct sol_oic_platform_info *info), const void *data)
 Retrieve platform information from addr. More...
 
struct sol_oic_pendingsol_oic_client_get_server_info (struct sol_oic_client *client, struct sol_oic_resource *resource, void(*info_received_cb)(void *data, struct sol_oic_client *cli, const struct sol_oic_device_info *info), const void *data)
 Retrieve server information. More...
 
struct sol_oic_pendingsol_oic_client_get_server_info_by_addr (struct sol_oic_client *client, struct sol_network_link_addr *addr, void(*info_received_cb)(void *data, struct sol_oic_client *cli, const struct sol_oic_device_info *info), const void *data)
 Retrieve server information from addr. More...
 
struct sol_oic_clientsol_oic_client_new (void)
 Creates a new OIC client intance. More...
 
struct sol_oic_requestsol_oic_client_non_confirmable_request_new (enum sol_coap_method method, struct sol_oic_resource *res)
 Create an OIC client request for an specific resource, using a non-confirmable CoAP packet. More...
 
struct sol_oic_pendingsol_oic_client_request (struct sol_oic_client *client, struct sol_oic_request *request, void(*callback)(void *data, enum sol_coap_response_code response_code, struct sol_oic_client *cli, const struct sol_network_link_addr *addr, const struct sol_oic_map_reader *repr_vec), const void *callback_data)
 Send a request packet to server. More...
 
void sol_oic_client_request_free (struct sol_oic_request *request)
 Release memory from a request. More...
 
struct sol_oic_map_writersol_oic_client_request_get_writer (struct sol_oic_request *request)
 Get the packet writer from a client request. More...
 
struct sol_oic_requestsol_oic_client_request_new (enum sol_coap_method method, struct sol_oic_resource *res)
 Create an OIC client request for an specific resource, using a confirmable CoAP packet. More...
 
int sol_oic_client_resource_set_observable (struct sol_oic_client *client, struct sol_oic_resource *res, void(*callback)(void *data, enum sol_coap_response_code response_code, struct sol_oic_client *cli, const struct sol_network_link_addr *addr, const struct sol_oic_map_reader *repr_map), const void *data, bool observe)
 Set this resource as observable for this client. More...
 
int sol_oic_client_resource_set_observable_non_confirmable (struct sol_oic_client *client, struct sol_oic_resource *res, void(*callback)(void *data, enum sol_coap_response_code response_code, struct sol_oic_client *cli, const struct sol_network_link_addr *addr, const struct sol_oic_map_reader *repr_map), const void *data, bool observe)
 Set this resource as observable for this client, using non-confirmable packets. More...
 
void sol_oic_pending_cancel (struct sol_oic_pending *pending)
 Cancel a pending OIC call. More...
 
struct sol_oic_resourcesol_oic_resource_ref (struct sol_oic_resource *r)
 Take a reference of the given server. More...
 
void sol_oic_resource_unref (struct sol_oic_resource *r)
 Release a reference from the given resource. More...
 

Detailed Description

Routines to create clients talking the OIC protocol.

Macro Definition Documentation

#define SOL_OIC_RESOURCE_API_VERSION   (1)