Own fork of MbedSmartRest

Dependents:   MbedSmartRestMain MbedSmartRestMain

Fork of MbedSmartRest by Cumulocity Official

Revision:
11:e1bee9a77652
Parent:
7:8159a2d12e4e
Child:
13:aba98ad2ac1b
--- a/AbstractSmartRest.h	Thu Oct 23 14:41:58 2014 +0200
+++ b/AbstractSmartRest.h	Sat Nov 15 11:21:01 2014 +0100
@@ -59,89 +59,89 @@
  */
 class AbstractSmartRest
 {
-public:
-    virtual ~AbstractSmartRest() { };
+	public:
+		virtual ~AbstractSmartRest() { };
 
-    /**
-     * Sets the client authorization.
-     * @param username the authorization username
-     * @param password the authorization password
-     */
-    virtual uint8_t setAuthorization(const char*, const char*) = 0;
+		/**
+		 * Sets the client authorization.
+		 * @param username the authorization username
+		 * @param password the authorization password
+		 */
+		virtual uint8_t setAuthorization(const char*, const char*) = 0;
 
 #ifdef SMARTREST_TRANSACTIONAL
-    /**
-     * Performs a SmartRest request without receiving any data from the
-     * server.
-     * @param generator the generator which will generate the data to be
-     *                  sent as a template.
-     * @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 request(const DataGenerator&, const char* = NULL) = 0;
+		/**
+		 * Performs a SmartRest request without receiving any data from the
+		 * server.
+		 * @param generator the generator which will generate the data to be
+		 *                  sent as a template.
+		 * @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 request(const DataGenerator&, const char* = NULL) = 0;
 
-    /**
-     * Performs a SmartRest request.
-     * @param generator the generator which will generate the data to be
-     *                  sent as a template.
-     * @param aggregator the aggregator where all received records will
-     *                   be stored. The aggregator must be managed,
-     *                   otherwise an error will be returned.
-     * @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 request(const DataGenerator&, Aggregator&, const char* = NULL) = 0;
+		/**
+		 * Performs a SmartRest request.
+		 * @param generator the generator which will generate the data to be
+		 *                  sent as a template.
+		 * @param aggregator the aggregator where all received records will
+		 *                   be stored. The aggregator must be managed,
+		 *                   otherwise an error will be returned.
+		 * @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 request(const DataGenerator&, Aggregator&, const char* = NULL) = 0;
 #endif
 
-    /*
-     * Initiates the SmartRest bootstrap process.
-     * When successful, the template identifier will be replaced by the
-     * global managed object ID in future requests.
-     * @param generator the generator which will generate the data to be
-     *                  sent as a template.
-     * @return a non-zero value if and only if an error occured
-     */
-    virtual uint8_t bootstrap(const DataGenerator&) = 0;
+		/*
+		 * Initiates the SmartRest bootstrap process.
+		 * When successful, the template identifier will be replaced by the
+		 * global managed object ID in future requests.
+		 * @param generator the generator which will generate the data to be
+		 *                  sent as a template.
+		 * @return a non-zero value if and only if an error occured
+		 */
+		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
-     *                  sent.
-     * @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 send(const DataGenerator&, const char* = NULL) = 0;
+		/**
+		 * Sends a smart request.
+		 * @param generator the generator which will generate the data to be
+		 *                  sent.
+		 * @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 send(const DataGenerator&, 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.
-     * @param record an instance to where the parsed row is written
-     * @return a non-zero value if and only if an error occured
-     */
-    virtual uint8_t receive(ParsedRecord&) = 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.
+		 * @param record an instance to where the parsed row is written
+		 * @return a non-zero value if and only if an error occured
+		 */
+		virtual uint8_t receive(ParsedRecord&) = 0;
 
-    /*
-     * Closes the connection.
-     */
-    virtual void stop() = 0;
+		/*
+		 * Closes the connection.
+		 */
+		virtual void stop() = 0;
 #endif
 
-    /*
-     * Retrieves the template identifier.
-     * @return template identifier
-     */
-    virtual const char * getIdentifier() = 0;
+		/*
+		 * Retrieves the template identifier.
+		 * @return template identifier
+		 */
+		virtual const char * getIdentifier() = 0;
 };
 
 #endif