Own fork of MbedSmartRest

Dependents:   MbedSmartRestMain MbedSmartRestMain

Fork of MbedSmartRest by Cumulocity Official

Revision:
13:aba98ad2ac1b
Parent:
11:e1bee9a77652
Child:
20:505d29d5bdfc
--- a/AbstractSmartRest.h	Sat Nov 15 11:37:14 2014 +0100
+++ b/AbstractSmartRest.h	Sat Nov 15 12:21:41 2014 +0100
@@ -109,7 +109,6 @@
 		 */
 		virtual uint8_t bootstrap(const DataGenerator&) = 0;
 
-#ifndef SMARTREST_TRANSACTIONAL
 		/**
 		 * Sends a smart request.
 		 * @param generator the generator which will generate the data to be
@@ -123,6 +122,18 @@
 		virtual uint8_t send(const DataGenerator&, const char* = NULL) = 0;
 
 		/**
+		 * Starts a SmartRest stream.
+         * @param uri the stream endpoint URI
+		 * @param record the record which will be sent to the endpoint
+		 * @param overrideIdentifier a device identifier which gets sent instead
+		 *                           of the identifier specified in the
+		 *                           constructor. If an empty string is
+		 *                           specified, no identifier is sent at all.
+		 * @return a non-zero value if and only if an error occured
+		 */
+		virtual uint8_t stream(const char*, const Record&, const char* = NULL) = 0;
+
+		/**
 		 * Tries to receive a parsed response row.
 		 * When the function succeeds, but the row pointer is NULL, there are
 		 * no more rows to be read.
@@ -135,7 +146,6 @@
 		 * Closes the connection.
 		 */
 		virtual void stop() = 0;
-#endif
 
 		/*
 		 * Retrieves the template identifier.