Tizen RT Public API  v1.0 D5
dm_connectivity.h
Go to the documentation of this file.
1 /****************************************************************************
2  *
3  * Copyright 2016 Samsung Electronics All Rights Reserved.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing,
12  * software distributed under the License is distributed on an
13  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
14  * either express or implied. See the License for the specific
15  * language governing permissions and limitations under the License.
16  *
17  ****************************************************************************/
18 
31 #ifndef DM_CONNECTIVITY_H_
32 #define DM_CONNECTIVITY_H_
33 
34 #ifdef __cplusplus
35 extern "C"
36 {
37 #endif
38 
39 #ifdef DM_API_DEBUG
40 #define dmdbg(format, ...) printf("DM_API (%s): " format, __FUNCTION__, ##__VA_ARGS__)
41 #else
42 #define dmdbg(a, ...) (void)0
43 #endif
44 
45 typedef void (*conn_cb)(void);
46 
54 int dm_conn_get_rssi(int *rssi);
55 
63 int dm_conn_get_address(char *ipAddr);
64 
72 int dm_conn_get_interface(char *interface);
73 
81 int dm_conn_get_channel(int *channel);
82 
90 int dm_conn_get_tx_power(int *dbm);
91 
99 int dm_conn_set_tx_power(const int *dbm);
100 
108 int dm_conn_register_linkup_cb(conn_cb cb);
109 
117 int dm_conn_register_linkdown_cb(conn_cb cb);
118 
126 int dm_conn_unregister_linkup_cb(conn_cb cb);
127 
135 int dm_conn_unregister_linkdown_cb(conn_cb cb);
136 
137 #ifdef __cplusplus
138 }
139 #endif
140 
141 #endif /* DM_CONNECTIVITY_H_ */
142  // end of Connectivity group
int dm_conn_get_channel(int *channel)
get the channel of network
int dm_conn_get_tx_power(int *dbm)
get the tx power of network
int dm_conn_get_interface(char *interface)
get the current interface of network
int dm_conn_set_tx_power(const int *dbm)
set the tx power of network
int dm_conn_get_rssi(int *rssi)
get the rssi of network
int dm_conn_unregister_linkdown_cb(conn_cb cb)
unregister link down callback function for connectivity event.
int dm_conn_unregister_linkup_cb(conn_cb cb)
unregister link up callback function for connectivity event.
int dm_conn_register_linkup_cb(conn_cb cb)
register link up callback function for connectivity event.
int dm_conn_get_address(char *ipAddr)
get the ip address of network
int dm_conn_register_linkdown_cb(conn_cb cb)
register link down callback function for connectivity event.