C Messaging API Reference for Oracle Internet of Things Cloud Service Client Software Library. Release 21.1.1.0.0-3. E70344-26
|
00001 /* 00002 * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. 00003 * 00004 * This software is dual-licensed to you under the MIT License (MIT) and 00005 * the Universal Permissive License (UPL). See the LICENSE file in the root 00006 * directory for license terms. You may choose either license, or both. 00007 */ 00008 00009 00015 #ifndef IOTCS_H 00016 #define IOTCS_H 00017 00018 #include <stddef.h> 00019 #include <stdint.h> 00020 00021 #include "iotcs_config.h" 00026 typedef enum { 00027 IOTCS_RESULT_OK = 0x0, 00028 IOTCS_RESULT_FAIL = 0x1, 00029 IOTCS_RESULT_OUT_OF_MEMORY = 0x2, 00030 IOTCS_RESULT_INVALID_ARGUMENT = 0x4, 00031 IOTCS_RESULT_CANNOT_AUTHORIZE = 0x8, 00032 IOTCS_RESULT_OPERATION_CANCELED = 0x10 00033 } iotcs_result; 00034 00039 typedef enum { 00040 IOTCS_VALUE_TYPE_INT = 0, 00041 IOTCS_VALUE_TYPE_NUMBER = 1, 00042 IOTCS_VALUE_TYPE_BOOLEAN = 2, 00043 IOTCS_VALUE_TYPE_STRING = 3, 00044 IOTCS_VALUE_TYPE_DATE_TIME = 4, 00045 IOTCS_VALUE_TYPE_NONE = 5, 00046 IOTCS_VALUE_TYPE_URI = 6 00047 } iotcs_value_type; 00048 00053 typedef int64_t iotcs_date_time; 00054 00055 #define IOTCS_TRUE ((iotcs_bool)1) 00056 #define IOTCS_FALSE ((iotcs_bool)0) 00062 typedef int iotcs_bool; 00063 00064 #if defined IOTCS_STORAGE_SUPPORT || !defined IOTCS_DOXYGEN 00065 struct iotcs_uri_object_t; 00066 typedef struct iotcs_uri_object_t* iotcs_storage_object_handle; 00067 #if !defined IOTCS_DOXYGEN 00068 typedef struct iotcs_uri_object_t* iotcs_external_object_handle; 00069 #endif 00070 #endif 00071 00076 typedef union { 00077 int int_value; 00078 float number_value; 00079 const char* string_value; 00080 iotcs_bool bool_value; 00081 iotcs_date_time date_time_value; 00082 #if defined IOTCS_STORAGE_SUPPORT || defined IOTCS_DOXYGEN 00083 struct iotcs_uri_object_t *uri_object; 00084 #endif 00085 } iotcs_value; 00086 00091 typedef struct { 00092 iotcs_value_type type; 00093 iotcs_value value; 00094 } iotcs_typed_value; 00095 00100 typedef struct { 00101 const char* key; 00102 const char* value; 00103 } iotcs_key_value; 00104 00105 #endif /* IOTCS_H */