1 //******************************************************************
3 // Copyright 2016 Samsung Electronics All Rights Reserved.
5 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
7 // Licensed under the Apache License, Version 2.0 (the "License");
8 // you may not use this file except in compliance with the License.
9 // You may obtain a copy of the License at
11 // http://www.apache.org/licenses/LICENSE-2.0
13 // Unless required by applicable law or agreed to in writing, software
14 // distributed under the License is distributed on an "AS IS" BASIS,
15 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 // See the License for the specific language governing permissions and
17 // limitations under the License.
19 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
21 #ifndef ES_ENROLLEE_COMMON_H_
22 #define ES_ENROLLEE_COMMON_H_
33 * @brief Data structure for connect request from Mediator
37 ES_CONNECT_TYPE connect[NUM_CONNECT_TYPE];
42 * @brief Data structure delivered from mediator, which provides WiFi information
46 char ssid[OIC_STRING_MAX_VALUE]; /**< Ssid of the Enroller**/
47 char pwd[OIC_STRING_MAX_VALUE]; /**< Pwd of the Enroller**/
48 WIFI_AUTHTYPE authtype; /**< Auth type of the Enroller**/
49 WIFI_ENCTYPE enctype; /**< Encryption type of the Enroller**/
50 void *userdata; /**< Vender-specific data**/
54 * @brief Data structure delivered from mediator, which provides device configuration information
58 // TODO: variables can be added when some properties in oic.r.devconf resource are specified.
59 void *userdata; /**< Vender-specific data**/
63 * @brief Data structure delivered from mediator, which provides Cloud server information
67 char authCode[OIC_STRING_MAX_VALUE]; /**< Auth code issued by OAuth2.0-compatible account server **/
68 char accessToken[OIC_STRING_ACCESS_TOKEN_MAX_VALUE]; /**< Access token resolved with an auth code **/
69 OAUTH_TOKENTYPE accessTokenType; /**< Access token type **/
70 char authProvider[OIC_STRING_MAX_VALUE]; /**< Auth provider ID **/
71 char ciServer[OIC_STRING_MAX_VALUE]; /**< Cloud interface server URL which an Enrollee is going to registered **/
72 void *userdata; /**< Vender-specific data**/
73 } ESCoapCloudConfData;
76 * @brief Data structure stored for Device property which includes a WiFi and device configuration.
81 * @brief Data structure indicating WiFi configuration of Enrollee
85 WIFI_MODE mode[NUM_WIFIMODE];
90 * @brief Data structure indicating device configuration of Enrollee
94 char deviceName[OIC_STRING_MAX_VALUE];
99 * A set of functions pointers for callback functions which are called after provisioning data is
100 * received from Mediator.
104 void (*ConnectRequestCb) (ESConnectRequest *);
105 void (*WiFiConfProvCb) (ESWiFiConfData *);
106 void (*DevConfProvCb) (ESDevConfData *);
107 void (*CoapCloudConfProvCb) (ESCoapCloudConfData *);
108 } ESProvisioningCallbacks;
115 #endif //ES_ENROLLEE_COMMON_H_