test
Fork of mbed-libxively-6eca970 by
src/libxively/comm_layers/mbed/mbed_comm.h@0:82702e998d3f, 2013-06-26 (annotated)
- Committer:
- xively
- Date:
- Wed Jun 26 10:40:43 2013 +0000
- Revision:
- 0:82702e998d3f
libxively v0.1.1-rc0 (34c8b32)
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
xively | 0:82702e998d3f | 1 | // Copyright (c) 2003-2013, LogMeIn, Inc. All rights reserved. |
xively | 0:82702e998d3f | 2 | // This is part of Xively C library, it is under the BSD 3-Clause license. |
xively | 0:82702e998d3f | 3 | |
xively | 0:82702e998d3f | 4 | /** |
xively | 0:82702e998d3f | 5 | * \file mbed_comm.h |
xively | 0:82702e998d3f | 6 | * \author Olgierd Humenczuk |
xively | 0:82702e998d3f | 7 | * \brief Implements mbed _communication layer_ functions [see comm_layer.h and mbed_comm.cpp] |
xively | 0:82702e998d3f | 8 | */ |
xively | 0:82702e998d3f | 9 | |
xively | 0:82702e998d3f | 10 | #ifndef __MBED_COMM_H__ |
xively | 0:82702e998d3f | 11 | #define __MBED_COMM_H__ |
xively | 0:82702e998d3f | 12 | |
xively | 0:82702e998d3f | 13 | #include "connection.h" |
xively | 0:82702e998d3f | 14 | |
xively | 0:82702e998d3f | 15 | #ifdef __cplusplus |
xively | 0:82702e998d3f | 16 | extern "C" { |
xively | 0:82702e998d3f | 17 | #endif |
xively | 0:82702e998d3f | 18 | |
xively | 0:82702e998d3f | 19 | connection_t* mbed_open_connection( const char* address, int32_t port ); |
xively | 0:82702e998d3f | 20 | |
xively | 0:82702e998d3f | 21 | int mbed_send_data( connection_t* conn, const char* data, size_t size ); |
xively | 0:82702e998d3f | 22 | |
xively | 0:82702e998d3f | 23 | int mbed_read_data( connection_t* conn, char* buffer, size_t buffer_size ); |
xively | 0:82702e998d3f | 24 | |
xively | 0:82702e998d3f | 25 | void mbed_close_connection( connection_t* conn ); |
xively | 0:82702e998d3f | 26 | |
xively | 0:82702e998d3f | 27 | #ifdef __cplusplus |
xively | 0:82702e998d3f | 28 | } |
xively | 0:82702e998d3f | 29 | #endif |
xively | 0:82702e998d3f | 30 | |
xively | 0:82702e998d3f | 31 | #endif // __MBED_COMM_H__ |