1 /******************************************************************
3 * Copyright 2015 Samsung Electronics All Rights Reserved.
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 #include "networkhandler.h"
26 #include "easysetup.h"
27 #include "oic_string.h"
29 #define LOG_TAG "TIZEN ES"
31 const char *gSsid = "DLNA_LISMORE1";
32 const char *gPass = "dlna@010203";
34 NetworkEventCallback gNetworkEventCb;
37 * All the functions defined in this file are stub functions to be implemented by the end user of
38 * Easysetup Enrollee applications.
40 static void ESActivateWifi()
47 OIC_LOG(INFO, LOG_TAG, "START");
51 void ConnectToWiFiNetwork(const char *ssid, const char *pass, NetworkEventCallback cb)
53 OIC_LOG_V(INFO, LOG_TAG, "ConnectToWiFiNetwork %s %s",ssid,pass);
60 ESResult getCurrentNetworkInfo(OCConnectivityType targetType, NetworkInfo *info)
62 if (targetType == CT_ADAPTER_IP)
64 info->type = CT_ADAPTER_IP;
65 info->ipaddr = gIpAddress;
66 if (strlen(gSsid) <= MAXSSIDLEN)
68 OICStrcpy(info->ssid, sizeof(info->ssid), gSsid);