1 //******************************************************************
3 // Copyright 2014 Intel Corporation All Rights Reserved.
4 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
9 //-----------------------------------------------------------------------------
11 //-----------------------------------------------------------------------------
13 #include "ocstackinternal.h"
16 //-----------------------------------------------------------------------------
18 //-----------------------------------------------------------------------------
26 //-----------------------------------------------------------------------------
27 // Function Prototypes
28 //-----------------------------------------------------------------------------
31 * Initialize the CoAP client or server with the its IPv4 address and CoAP port
34 * IP Address of host device
38 * Host device is client, server, or client-server
44 int OCInitCoAP(const char *address, uint16_t port, OCMode mode);
47 * Discover OC resources
49 * @param method - method to perform on the resource
50 * @param Uri - URI of the resource to interact with
51 * @param asyncReturnFunc - asynchronous callback function that is invoked
52 * by the stack when discovery or resource interaction is complete
57 int OCDoCoAPResource(OCMethod method, OCQualityOfService qos, OCToken * token, const char *Uri);
61 * Stop the CoAP client or server processing
63 * @return 0 - success, else - TBD error
68 * Called in main loop of CoAP client or server. Allows low-level CoAP processing of
69 * send, receive, timeout, discovery, callbacks, etc.
71 * @return 0 - success, else - TBD error
76 #endif /* OCCOAP_H_ */