Modifying version number for building on tizen 3.0
[platform/upstream/iotivity.git] / resource / csdk / connectivity / inc / cawificore.h
1 /******************************************************************
2  *
3  * Copyright 2014 Samsung Electronics All Rights Reserved.
4  *
5  *
6  *
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
10  *
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  *
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.
18  *
19  ******************************************************************/
20
21 /**
22  * @file cawificore.h
23  * @brief This file contains the APIs for Wi-Fi communications.
24  */
25 #ifndef __CA_WIFICORE_H_
26 #define __CA_WIFICORE_H_
27
28 #include "cacommon.h"
29 #include "config.h"
30 #include "coap.h"
31
32 #ifdef __cplusplus
33 extern "C"
34 {
35 #endif
36
37 typedef void (*CAPacketReceiveCallback)(const char* address, const char* data);
38
39 void CAWiFiInitialize();
40
41 void CAWiFiTerminate();
42
43 int32_t CAWiFiSendUnicastMessage(const char* address, const char* data, int32_t length);
44
45 int32_t CAWiFiSendMulticastMessage(const char* m_address, const char* data);
46
47 int32_t CAWiFiStartUnicastServer(const char* address, int32_t port);
48
49 int32_t CAWiFiStartMulticastServer(const char* m_address, int32_t port);
50
51 int32_t CAWiFiStopUnicastServer(int32_t server_id);
52
53 int32_t CAWiFiStopMulticastServer(int32_t server_id);
54
55 void CAWiFiSetCallback(CAPacketReceiveCallback callback);
56
57 void* CAUnicastReceiveThread(void* data);
58
59 void* CAUnicastSendThread(void* data);
60
61 void CASendUnicastMessage(char* address, void* data);
62
63 int32_t CASendUnicastMessageImpl(const char* address, const char* data, int32_t lengh);
64
65 void CAStopUnicastSendThread();
66
67 void* CAMulticastReceiveThread(void* data);
68
69 void* CAMulticastSendThread(void* data);
70
71 void CASendMulticastMessage(void* data);
72
73 int32_t CASendMulticastMessageImpl(const char* msg);
74
75 void CAStopMulticastSendThread();
76
77 void CAGetLocalAddress(char* addressBuffer);
78
79 #ifdef __cplusplus
80 } /* extern "C" */
81 #endif
82
83 #endif