Dependents: xively-jumpstart-demo
This is Xively C library, the code lives on GitHub.
See our example program and the tutorial, documentation can bee found here.
src/libxively/http_layer_queries.h@0:53753690a8bf, 2013-05-13 (annotated)
- Committer:
- xively
- Date:
- Mon May 13 19:28:22 2013 +0000
- Revision:
- 0:53753690a8bf
libxively v0.1.1-rc0
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
xively | 0:53753690a8bf | 1 | // Copyright (c) 2003-2013, LogMeIn, Inc. All rights reserved. |
xively | 0:53753690a8bf | 2 | // This is part of Xively C library, it is under the BSD 3-Clause license. |
xively | 0:53753690a8bf | 3 | |
xively | 0:53753690a8bf | 4 | /** |
xively | 0:53753690a8bf | 5 | * \file http_layer_queries.c |
xively | 0:53753690a8bf | 6 | * \author Olgierd Humenczuk |
xively | 0:53753690a8bf | 7 | * \brief Helpers for making HTTP requests (specific to Xively REST/HTTP API) |
xively | 0:53753690a8bf | 8 | * |
xively | 0:53753690a8bf | 9 | * * All functions return pointer to the buffer with request string or null in case of any error. |
xively | 0:53753690a8bf | 10 | |
xively | 0:53753690a8bf | 11 | * \warning The buffer is managed by the library, so it's forbidden to free the pointer. |
xively | 0:53753690a8bf | 12 | */ |
xively | 0:53753690a8bf | 13 | |
xively | 0:53753690a8bf | 14 | #ifndef __HTTP_LAYERS_QUERIES_H__ |
xively | 0:53753690a8bf | 15 | #define __HTTP_LAYERS_QUERIES_H__ |
xively | 0:53753690a8bf | 16 | |
xively | 0:53753690a8bf | 17 | #include <stdlib.h> |
xively | 0:53753690a8bf | 18 | #include <stdint.h> |
xively | 0:53753690a8bf | 19 | |
xively | 0:53753690a8bf | 20 | #ifdef __cplusplus |
xively | 0:53753690a8bf | 21 | extern "C" { |
xively | 0:53753690a8bf | 22 | #endif |
xively | 0:53753690a8bf | 23 | |
xively | 0:53753690a8bf | 24 | const char* http_construct_request_datapoint( |
xively | 0:53753690a8bf | 25 | const char* http_method |
xively | 0:53753690a8bf | 26 | , const int32_t* feed_id |
xively | 0:53753690a8bf | 27 | , const char* datastream_id |
xively | 0:53753690a8bf | 28 | , const char* dp_ts_str |
xively | 0:53753690a8bf | 29 | , const char* x_api_key ); |
xively | 0:53753690a8bf | 30 | |
xively | 0:53753690a8bf | 31 | const char* http_construct_request_datastream( |
xively | 0:53753690a8bf | 32 | const char* http_method |
xively | 0:53753690a8bf | 33 | , const int32_t* feed_id |
xively | 0:53753690a8bf | 34 | , const char* datastream_id |
xively | 0:53753690a8bf | 35 | , const char* x_api_key ); |
xively | 0:53753690a8bf | 36 | |
xively | 0:53753690a8bf | 37 | const char* http_construct_request_feed( |
xively | 0:53753690a8bf | 38 | const char* http_method |
xively | 0:53753690a8bf | 39 | , const int32_t* feed_id |
xively | 0:53753690a8bf | 40 | , const char* x_api_key |
xively | 0:53753690a8bf | 41 | , const char* query_suffix ); |
xively | 0:53753690a8bf | 42 | |
xively | 0:53753690a8bf | 43 | const char* http_construct_content( |
xively | 0:53753690a8bf | 44 | int32_t content_size ); |
xively | 0:53753690a8bf | 45 | |
xively | 0:53753690a8bf | 46 | #ifdef __cplusplus |
xively | 0:53753690a8bf | 47 | } |
xively | 0:53753690a8bf | 48 | #endif |
xively | 0:53753690a8bf | 49 | |
xively | 0:53753690a8bf | 50 | #endif // __HTTP_LAYERS_QUERIES_H__ |