3 * Copyright (c) 2012 Samsung Electronics Co., Ltd.
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
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
29 #include "common/dm_common.h"
31 #define errno_abort(text) do {\
32 fprintf(stderr, "%s at \"%s\":%d: %s\n", text, __FILE__, __LINE__, strerror(errno));\
36 #define assert_condition(condition) do{\
38 fprintf(stderr, "assert at \"%s\":%d: %s\n", __FILE__, __LINE__, strerror(errno));\
44 * @par Description: API to free string
48 * @par Typical use case:
49 * @par Method of function operation:
50 * @par Important notes:
67 void str_free(char **str);
70 * @par Description: API to exchange char to int
74 * @par Typical use case:
75 * @par Method of function operation:
76 * @par Important notes:
95 int chartoint(char *data, int *value);
98 * @par Description: API to launch oma dm fumo ui
102 * @par Typical use case:
103 * @par Method of function operation:
104 * @par Important notes:
121 int launch_oma_dm_fumo_ui();
124 * @par Description: API to launch oma dm fumo noti ui
128 * @par Typical use case:
129 * @par Method of function operation:
130 * @par Important notes:
131 * @param[in] noti type ( user interaction, imformative, background )
132 * @param[in] session id
133 * @param[in] server id
150 int launch_om_dm_fumo_noti_ui(int noti_data, char *session_id, char *server_id);
153 * @par Description: API to launch oma dm alert ui
157 * @par Typical use case:
158 * @par Method of function operation:
159 * @par Important notes:
176 int launch_om_dm_fumo_alert_ui();
179 * @par Description: API to launch oma dm cp ui
183 * @par Typical use case:
184 * @par Method of function operation:
185 * @par Important notes:
186 * @param[in] pin type
204 int launch_oma_dm_cp_ui(int sec_type, int ext_id);
207 * @par Description: API to terminate oma dm ui
211 * @par Typical use case:
212 * @par Method of function operation:
213 * @par Important notes:
214 * @param[in] return result
215 * @param[in] service engine id
232 void terminate_oma_dm_ui(int ret, ENGINE_ID service_engine_id);
235 * @par Description: API to terminate ui status
239 * @par Typical use case:
240 * @par Method of function operation:
241 * @par Important notes:
242 * @param[in] noty type
244 * @param[in] return result
261 void terminate_ui_status(int noti_type, char *ui_mode, int ret);
264 * @par Description: API to terminate ui status
268 * @par Typical use case:
269 * @par Method of function operation:
270 * @par Important notes:
290 * @par Description: API to get wifi state
294 * @par Typical use case:
295 * @par Method of function operation:
296 * @par Important notes:
313 int get_wifi_state();
316 * @par Description: API to nonce decode
320 * @par Typical use case:
321 * @par Method of function operation:
322 * @par Important notes:
323 * @param[in] nextNonce
324 * @param[out] nextNonceDecode
325 * @param[out] out_len
327 * @return DM_OK success
342 DM_ERROR nonce_decode(char *nextNonce, unsigned char **nextNonceDecode, unsigned int *out_len);
345 /*bool hex2char(char const* szHex, unsigned char* rch);*/