Salesforce Case Generator for mbed

Committer:
ansond
Date:
Wed Sep 24 18:52:45 2014 +0000
Revision:
12:8603f9ff1336
Parent:
10:ebdae744ee07
Child:
13:1e06a3a4740d
updates for temp and lat/long inclusion into case

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ansond 0:5953127f7c19 1 /* Copyright C2014 ARM, MIT License
ansond 0:5953127f7c19 2 *
ansond 0:5953127f7c19 3 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
ansond 0:5953127f7c19 4 * and associated documentation files the "Software", to deal in the Software without restriction,
ansond 0:5953127f7c19 5 * including without limitation the rights to use, copy, modify, merge, publish, distribute,
ansond 0:5953127f7c19 6 * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
ansond 0:5953127f7c19 7 * furnished to do so, subject to the following conditions:
ansond 0:5953127f7c19 8 *
ansond 0:5953127f7c19 9 * The above copyright notice and this permission notice shall be included in all copies or
ansond 0:5953127f7c19 10 * substantial portions of the Software.
ansond 0:5953127f7c19 11 *
ansond 0:5953127f7c19 12 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
ansond 0:5953127f7c19 13 * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
ansond 0:5953127f7c19 14 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
ansond 0:5953127f7c19 15 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
ansond 0:5953127f7c19 16 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
ansond 0:5953127f7c19 17 */
ansond 0:5953127f7c19 18
ansond 0:5953127f7c19 19 #ifndef _SALESFORCE_CASE_GENERATOR_H_
ansond 0:5953127f7c19 20 #define _SALESFORCE_CASE_GENERATOR_H_
ansond 0:5953127f7c19 21
ansond 1:5c876ee72cf0 22 #include "HTTPClient.h"
ansond 6:175744b497e2 23 #include "ErrorHandler.h"
ansond 0:5953127f7c19 24
ansond 0:5953127f7c19 25 class SalesForceCaseGenerator {
ansond 0:5953127f7c19 26 private:
ansond 10:ebdae744ee07 27 HTTPClient *m_http;
ansond 6:175744b497e2 28 ErrorHandler *m_logger;
ansond 0:5953127f7c19 29
ansond 0:5953127f7c19 30 public:
ansond 10:ebdae744ee07 31 SalesForceCaseGenerator(ErrorHandler *logger,void *transport);
ansond 0:5953127f7c19 32 virtual ~SalesForceCaseGenerator();
ansond 0:5953127f7c19 33
ansond 0:5953127f7c19 34 // create a case (via APEX)
ansond 12:8603f9ff1336 35 bool createCase(char *subject, char *description, char *condition, int temperature, char *latitude, char *longitude);
ansond 0:5953127f7c19 36
ansond 0:5953127f7c19 37 protected:
ansond 0:5953127f7c19 38
ansond 0:5953127f7c19 39 private:
ansond 0:5953127f7c19 40 bool contains(char *json,char *key,char *value);
ansond 0:5953127f7c19 41 };
ansond 0:5953127f7c19 42
ansond 0:5953127f7c19 43 #endif // _SALESFORCE_CASE_GENERATOR_H_