Knox Tizen Wearable SDK
device_inventory.h
1 /*
2  * Copyright (c) 2000-2017 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  * PROPRIETARY/CONFIDENTIAL
5  *
6  * This software is the confidential and proprietary information of
7  * SAMSUNG ELECTRONICS ("Confidential Information").
8  * You shall not disclose such Confidential Information and shall
9  * use it only in accordance with the terms of the license agreement
10  * you entered into with SAMSUNG ELECTRONICS.
11  * SAMSUNG make no representations or warranties about the suitability
12  * of the software, either express or implied, including but not
13  * limited to the implied warranties of merchantability, fitness for
14  * a particular purpose, or non-infringement.
15  * SAMSUNG shall not be liable for any damages suffered by licensee as
16  * a result of using, modifying or distributing this software or its derivatives.
17  */
18 
19 #ifndef LIBMDM_MDM_DEVICE_INVENTORY_H
20 #define LIBMDM_MDM_DEVICE_INVENTORY_H
21 
22 #include "mdm_client_type.h"
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
36 typedef enum {
45  0x06,
53 
58 typedef enum {
81 
82 #ifndef MDM_FOR_SOLIS_PROF
83 
93 typedef enum mdm_sort_order_e {
97 
126 typedef enum mdm_history_parameter_e {
132 
138 
143 
148 
155 
164 
169 
179 
185 
194 typedef enum mdm_direction_e {
198 
207 typedef enum mdm_roaming_status_e {
211 
220 typedef enum mdm_history_event_type_e {
226 
243 typedef struct mdm_history_query_s {
248  mdm_history_parameter_t parameter;
249  union {
261  int64_t date;
262 
275  uint64_t record_id;
276 
284  mdm_direction_t direction;
285 
303  const char *destination_number;
304 
312  const char *sim_id;
313 
322  mdm_roaming_status_t roaming_status;
323 
331  mdm_history_event_type_t type;
332  };
334 
335 
348 typedef struct mdm_history_info_s {
352  mdm_history_event_type_t type;
353  union {
354  struct {
355  uint64_t record_id;
356  mdm_direction_t direction;
357  const char * number;
358  time_t timestamp;
359  const char * slot_id;
360  const char * imsi;
361  const char * iccid;
362  const char * imei;
363  const char * sim_msisdn;
364  mdm_roaming_status_t roaming_state;
365  const char * body;
366  } sms;
367  struct {
368  uint64_t record_id;
369  mdm_direction_t direction;
370  const char * number;
371  time_t timestamp;
372  const char * slot_id;
373  const char * imsi;
374  const char * iccid;
375  const char * imei;
376  const char * sim_msisdn;
377  mdm_roaming_status_t roaming_state;
378  const char * call_type;
379  int duration;
380  } call;
381  };
383 
392 typedef struct mdm_history_context_s mdm_history_context_t;
393 
394 #endif /* MDM_FOR_SOLIS_PROF */
395 
430 
431 #ifndef MDM_FOR_SOLIS_PROF
432 
433 /*
434  * @brief API to get the IMEI number for a specified SIM card.
435  *
436  * @since_mdm 1.1.0
437  *
438  * @since_tizen 2.4.0.4
439  *
440  * @feature %http://developer.samsung.com/tizen/feature/mdm
441  *
442  * @par Usage:
443  * Admin can get the unique device ID for the specified SIM card.
444  * For example, the IMEI for GSM and the MEID or ESN for CDMA phones.
445  * Returns null if device ID is not available.
446  *
447  * @code{.c}
448 
449  mdm_data_t *lp_data = mdm_msim_get_imei("SIM2");
450  if (lp_data) {
451  char *device_id = (char *)lp_data->data;
452  if(device_id != NULL) {
453  printf("device id : %s", device_id);
454  }
455 
456  // free after use
457  mdm_free_data(lp_data);
458  } else {
459  // Failure or device ID is not available
460  }
461 
462  * @endcode
463  *
464  * @param[in] id SIM card id. Check mdm_msim_get_sim_ids() for available SIM card ids.
465  *
466  * @return #mdm_data_t * : The unique device ID on success,
467  * NULL on error or if the device ID is not available
468  *
469  * @see mdm_get_device_id
470  */
471 mdm_data_t *mdm_msim_get_imei(const char *id);
472 
473 #endif /* MDM_FOR_SOLIS_PROF */
474 
511 MDM_DEPRECATED_API mdm_data_t *mdm_get_sim_serial_number(void);
512 
513 #ifndef MDM_FOR_SOLIS_PROF
514 
515 /*
516  * @brief API to get the Integrated Circuit Card ID (ICCID) of a specific SIM card in the device.
517  *
518  * @since_mdm 1.1.0
519  *
520  * @since_tizen 2.2.1.1
521  *
522  * @feature %http://developer.samsung.com/tizen/feature/mdm
523  *
524  * @par Usage:
525  * Admin can get the Integrated Circuit Card ID (ICCID) of the SIM card identified by SIM card ID, if applicable.
526  * Returns null if it is unavailable.
527  *
528  * @code{.c}
529 
530  mdm_data_t *lp_data = mdm_msim_get_sim_serial_number("SIM1");
531  if (lp_data) {
532  char *sim_iccid = (char *)lp_data->data;
533  if(device_id != NULL) {
534  printf("sim serial number : %s", sim_iccid);
535  }
536 
537  // free after use
538  mdm_free_data(lp_data);
539  } else {
540  // Failure or SIM ICCID is not available
541  }
542 
543  * @endcode
544  *
545  * @param[in] id SIM card id. Check mdm_msim_get_sim_ids() for available SIM card ids.
546  *
547  * @return #mdm_data_t * : The ICCID of the SIM card on success,
548  * NULL on error or if the ICCID is not available
549  *
550  */
551 mdm_data_t *mdm_msim_get_sim_serial_number(const char *id);
552 
553 #endif /* MDM_FOR_SOLIS_PROF */
554 
589 MDM_DEPRECATED_API mdm_data_t *mdm_get_bluetooth_address(void);
590 
628 MDM_DEPRECATED_API mdm_data_t *mdm_get_network_operator(void);
629 
666 MDM_DEPRECATED_API mdm_data_t *mdm_get_network_operator_name(void);
667 
709 MDM_DEPRECATED_API mdm_data_t *mdm_get_sim_operator_name(void);
710 
745 MDM_DEPRECATED_API mdm_data_t *mdm_get_subscriber_number(void);
746 
801 MDM_DEPRECATED_API mdm_network_service_type_t mdm_get_network_type(void);
802 
803 #ifndef MDM_FOR_SOLIS_PROF
804 
805 /*
806  * @brief API to get SIM IDs.
807  *
808  * This API will return the SIM cards IDs (slots) in the same order as they are
809  * on the device and as they are returned by other system API. If other API references SIM slots in any way,
810  * it references them in the same order as this API. First slot referenced by other API corresponds to first
811  * ID returned by mdm_msim_get_sim_ids() and last slot referenced by other API corresponds to the last ID returned by
812  mdm_msim_get_sim_ids().
813  *
814  * @since_mdm 1.1.0
815  *
816  * @since_tizen 2.2.1.1
817  *
818  * @feature %http://developer.samsung.com/tizen/feature/mdm
819  *
820  * @par Usage:
821  * @code{.c}
822 
823  mdm_data_t *lp_data = NULL;
824  lp_data = mdm_msim_get_sim_ids();
825  if (lp_data && lp_data->data) {
826  GList *sim_ids_list = g_list_first(lp_data->data);
827  for(; sim_ids_list; sim_ids_list = g_list_next(sim_ids_list))
828  {
829  printf("sim id [%s]\n", sim_ids_list->data ? (char*)sim_ids_list->data : "(null)");
830  }
831  mdm_free_data(lp_data);
832  }
833 
834  * @endcode
835  *
836  * @return #mdm_data_t * : The unique device ID on success,
837  * NULL on error or if the device ID is not available
838  */
839 mdm_data_t *mdm_msim_get_sim_ids(void);
840 
841 #endif /* MDM_FOR_SOLIS_PROF */
842 
877 MDM_DEPRECATED_API mdm_data_t *mdm_get_sim_operator(void);
878 
879 #ifndef MDM_FOR_SOLIS_PROF
880 
881 /*
882  * @brief API to get the numeric name (MCC+MNC+Msin) of the SIM operator.
883  *
884  * @since_mdm 1.1.0
885  *
886  * @since_tizen 2.4.0.4
887  *
888  * @feature %http://developer.samsung.com/tizen/feature/mdm
889  *
890  * @par Usage:
891  * Admin can get the MCC+MNC (mobile country code + mobile network code + station identification number)
892  * of the SIM operator. Equals to 17 decimal digits.
893  * @code{.c}
894 
895  mdm_data_t *lp_data = NULL;
896 
897  //use mdm_msim_get_sim_ids to get simid
898 
899  lp_data = mdm_msim_get_imsi(simid);
900  if (lp_data) {
901  char *imsi = (char *)lp_data->data;
902  if(imsi != NULL) {
903  printf("sim operator : %s", imsi);
904  }
905 
906  // free after use
907  mdm_free_data(lp_data);
908  }
909 
910  * @endcode
911  *
912  * @param[in] id SIM card id. Check mdm_msim_get_sim_ids() for available SIM card ids.
913  *
914  * @return #mdm_data_t * :The numeric name (MCC+MNC+Msin) of the SIM imsi on success, NULL on error.
915  *
916  */
917 mdm_data_t *mdm_msim_get_imsi(const char *id);
918 
919 #endif /* MDM_FOR_SOLIS_PROF */
920 
954 MDM_DEPRECATED_API mdm_data_t *mdm_get_sim_country_iso(void);
955 
956 #ifndef MDM_FOR_SOLIS_PROF
957 
958 /*
959  * @brief API to get the roaming state.
960  *
961  * @since_mdm 1.1.0
962  *
963  * @since_tizen 2.4.0.4
964  *
965  * @feature %http://developer.samsung.com/tizen/feature/mdm
966  *
967  * @par Usage:
968  * Admin may use this function to send a dbus request to telephony server and find out
969  * if roaming is enabled or not.
970  *
971  * @code{.c}
972 
973  mdm_status_t status = -1;
974  status = mdm_msim_get_sim_roaming_status("SIM1");
975  if (status == MDM_TRUE) {
976  // roaming enabled
977  } else if (status == MDM_FALSE) {
978  // roaming disabled
979  } else {
980  // error occured
981  }
982 
983  * @endcode
984  *
985  * @param[in] id SIM card id. Check mdm_msim_get_sim_ids() for available SIM card ids.
986  *
987  * @return #mdm_status_t : Whether roaming is enabled
988  *
989  * @retval #MDM_TRUE Enabled
990  * @retval #MDM_FALSE Disabled.
991  *
992  */
993 mdm_status_t mdm_msim_get_sim_roaming_status(const char *id);
994 
995 #endif /* MDM_FOR_SOLIS_PROF */
996 
1044 
1078 MDM_DEPRECATED_API mdm_data_t *mdm_get_wifi_mac_address(void);
1079 
1118 MDM_DEPRECATED_API mdm_status_t mdm_is_bluetooth_supported(void);
1119 
1159 MDM_DEPRECATED_API mdm_status_t mdm_get_bluetooth_mode_status(void);
1160 
1191 
1223 MDM_DEPRECATED_API mdm_data_t *mdm_get_platform_version(void);
1224 
1258 MDM_DEPRECATED_API mdm_data_t *mdm_get_total_capacity_internal(void);
1259 
1293 MDM_DEPRECATED_API mdm_data_t *mdm_get_available_capacity_internal(void);
1294 
1328 MDM_DEPRECATED_API mdm_data_t *mdm_get_total_capacity_external(void);
1329 
1363 MDM_DEPRECATED_API mdm_data_t *mdm_get_available_capacity_external(void);
1364 
1396 MDM_DEPRECATED_API mdm_data_t *mdm_get_model_name(void);
1397 
1429 
1461 
1493 MDM_DEPRECATED_API mdm_data_t *mdm_get_device_platform(void);
1494 
1526 MDM_DEPRECATED_API mdm_data_t *mdm_get_device_maker(void);
1527 
1557 
1593 MDM_DEPRECATED_API mdm_result_t mdm_get_success_calls_count(int *count);
1594 
1632 MDM_DEPRECATED_API mdm_result_t mdm_get_missed_calls_count(int *count);
1633 
1671 MDM_DEPRECATED_API mdm_result_t mdm_get_rejected_calls_count(int *count);
1672 
1710 MDM_DEPRECATED_API mdm_result_t mdm_get_blocked_calls_count(int *count);
1711 
1752 MDM_DEPRECATED_API mdm_result_t mdm_reset_calls_count(void);
1753 
1798 
1831 
1875 
1908 
1950 MDM_DEPRECATED_API mdm_result_t mdm_reset_data_usage(void);
1951 
1989 MDM_DEPRECATED_API mdm_result_t mdm_get_bytes_sent_wifi(long long *bytes);
1990 
2028 MDM_DEPRECATED_API mdm_result_t mdm_get_bytes_received_wifi(long long *bytes);
2029 
2067 MDM_DEPRECATED_API mdm_result_t mdm_get_bytes_sent_network(long long *bytes);
2068 
2107 MDM_DEPRECATED_API mdm_result_t mdm_get_bytes_received_network(long long *bytes);
2108 
2150 
2182 
2220 
2258 
2297 
2339 
2371 
2409 
2447 
2486 
2487 #ifndef MDM_FOR_SOLIS_PROF
2488 
2489 /*
2490  * @brief API to enable or disable SMS capture for a specific SIM card.
2491  *
2492  * @since_mdm 1.1.0
2493  *
2494  * @since_tizen 2.2.1.1
2495  *
2496  * @feature %http://developer.samsung.com/tizen/feature/mdm
2497  *
2498  * @par Usage:
2499  * Admin can use this API to enable or disable logging of SMS on device.
2500  * When logging is enabled, a direction ('From'/'To'), a phone number, message body and timestamp will be saved.
2501  *
2502  * @code{.c}
2503 
2504  mdm_result_t ret = mdm_msim_enable_sms_capture("SIM1", MDM_ENABLED);
2505  if (ret == MDM_RESULT_SUCCESS) {
2506  //Success
2507  }
2508 
2509  * @endcode
2510  *
2511  * @privlevel public
2512  * @privilege %http://developer.samsung.com/tizen/privilege/mdm.device
2513  *
2514  * @param[in] id SIM card id. Check mdm_msim_get_sim_ids() for available SIM card ids.
2515  * @param[in] status #MDM_ENABLED to enable SMS logging, #MDM_DISABLED to disable it.
2516  *
2517  * @return #mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
2518  *
2519  * @retval #MDM_RESULT_SUCCESS Successful
2520  * @retval #MDM_RESULT_FAIL General failure
2521  * @retval #MDM_RESULT_NOT_SUPPORTED Not supported
2522  * @retval #MDM_RESULT_INVALID_PARAM Invalid parameter
2523  * @retval #MDM_RESULT_ACCESS_DENIED The application does not have the privilege to call this function.
2524  *
2525  * @par Permission:
2526  * Usage of this API is restricted to registered clients only.
2527  *
2528  * @see mdm_msim_is_sms_capture_enabled, mdm_msim_get_inbound_sms_captured,
2529  * mdm_msim_outbound_sms_captured, mdm_msim_clear_sms_captured
2530  */
2531 mdm_result_t mdm_msim_enable_sms_capture(const char *id, mdm_status_t status);
2532 
2533 /*
2534  * @brief API to check whether SMS capture is enabled or disabled for specific SIM card.
2535  *
2536  * @since_mdm 1.1.0
2537  *
2538  * @since_tizen 2.2.1.1
2539  *
2540  * @feature %http://developer.samsung.com/tizen/feature/mdm
2541  *
2542  * @par Usage:
2543  * Used by admin to check whether SMS capture is enabled or disabled on device.
2544  *
2545  * @code{.c}
2546 
2547  mdm_status_t ret = mdm_is_sms_capture_enabled("SIM1");
2548  if (ret == MDM_ENABLED) {
2549  // SMS capture is enabled.
2550  }
2551 
2552  * @endcode
2553  *
2554  * @param[in] id SIM card id. Check mdm_msim_get_sim_ids() for available SIM card ids.
2555  *
2556  * @return #mdm_status_t : Whethercapturing SMS is enabled
2557  *
2558  * @retval #MDM_ENABLED Capturing SMS is enabled
2559  * @retval #MDM_DISABLED Capturing SMS is disabled
2560  * @retval #MDM_STATUS_ERROR Fail
2561  *
2562  * @see mdm_msim_enable_sms_capture, mdm_msim_get_inbound_sms_captured,
2563  * mdm_msim_outbound_sms_captured, mdm_msim_clear_sms_captured
2564  */
2565 mdm_status_t mdm_msim_is_sms_capture_enabled(const char *id);
2566 
2567 /*
2568  * @brief API to retrieve the inbound SMSes captured for a specific SIM card.
2569  *
2570  * @since_mdm 1.1.0
2571  *
2572  * @since_tizen 2.2.1.1
2573  *
2574  * @feature %http://developer.samsung.com/tizen/feature/mdm
2575  *
2576  * @par Usage:
2577  * Used by admin to get the inbound SMSs captured for a specific SIM card.
2578  * SMS capture has to be enabled with mdm_msim_enable_sms_capture().
2579  * Each String entry in the list will be of the following format
2580  * "To:XXX - From:XXX - TimeStamp:XXX - Body:XXX - IMSI:XXX - ICCID:XXX - IMEI:XXX - Roaming State:XXX"
2581  *
2582  * @code{.c}
2583 
2584  mdm_data_t *mdm_data = mdm_msim_get_inbound_sms_captured("SIM1");
2585  if (mdm_data != NULL && mdm_data->ret == MDM_RESULT_SUCCESS) {
2586 
2587  GList *current = g_list_first((GList *) mdm_data->data);
2588  while (current && current->data) {
2589  char *captured = (char *) current->data;
2590  printf("%s\n", captured);
2591  current = g_list_next(current);
2592  }
2593  }
2594  mdm_free_data(mdm_data);
2595 
2596  * @endcode
2597  *
2598  * @param[in] id SIM card id. Check mdm_msim_get_sim_ids() for available SIM card ids.
2599  *
2600  * @return A list of all inbound SMSs captured for a specific SIM card.
2601  * On error sets mdm_data_t::ret, only in case of memory allocation error may return NULL.
2602  *
2603  * @see mdm_msim_enable_sms_capture, mdm_msim_is_sms_capture_enabled,
2604  * mdm_msim_outbound_sms_captured, mdm_msim_clear_sms_captured
2605  */
2606 mdm_data_t *mdm_msim_get_inbound_sms_captured(const char *id);
2607 
2608 /*
2609  * @brief API to retrieve the outbound SMSes captured for a specific SIM card.
2610  *
2611  * @since_mdm 1.1.0
2612  *
2613  * @since_tizen 2.2.1.1
2614  *
2615  * @feature %http://developer.samsung.com/tizen/feature/mdm
2616  *
2617  * @par Usage:
2618  * Used by admin to get the outbound SMSs captured for a specific SIM card.
2619  * SMS capture has to be enabled with mdm_msim_enable_sms_capture().
2620  * Each String entry in the list will be of the following format
2621  * "To:XXX - From:XXX - TimeStamp:XXX - Body:XXX - IMSI:XXX - ICCID:XXX - IMEI:XXX - Roaming State:XXX"
2622  *
2623  * @code{.c}
2624 
2625  mdm_data_t *mdm_data = mdm_msim_get_outbound_sms_captured("SIM1");
2626  if (mdm_data != NULL && mdm_data->ret == MDM_RESULT_SUCCESS) {
2627 
2628  GList *current = g_list_first((GList *) mdm_data->data);
2629  while (current && current->data) {
2630  char *captured = (char *) current->data;
2631  printf("%s\n", captured);
2632  current = g_list_next(current);
2633  }
2634  }
2635  mdm_free_data(mdm_data);
2636 
2637  * @endcode
2638  *
2639  * @param[in] id SIM card id. Check mdm_msim_get_sim_ids() for available SIM card ids.
2640  *
2641  * @return A list of all outbound SMSs captured for a specific SIM card.
2642  * On error sets mdm_data_t::ret, only in case of memory allocation error may return NULL.
2643  *
2644  * @see mdm_msim_enable_sms_capture, mdm_msim_is_sms_capture_enabled,
2645  * mdm_msim_inbound_sms_captured, mdm_msim_clear_sms_captured
2646  */
2647 mdm_data_t *mdm_msim_get_outbound_sms_captured(const char *id);
2648 
2649 /*
2650  * @brief API to clear the SMS logged for a specific SIM card.
2651  *
2652  * @since_mdm 1.1.0
2653  *
2654  * @since_tizen 2.2.1.1
2655  *
2656  * @feature %http://developer.samsung.com/tizen/feature/mdm
2657  *
2658  * @par Usage:
2659  * Used by admin to clear the SMS logged on device.
2660  *
2661  * @code{.c}
2662 
2663  mdm_result_t ret = mdm_clear_sms_captured("SIM1");
2664  if (ret == MDM_RESULT_SUCCESS) {
2665  // Succeeded
2666  }
2667 
2668  * @endcode
2669  *
2670  * @param[in] id SIM card id. Check mdm_msim_get_sim_ids() for available SIM card ids.
2671  *
2672  * @privlevel public
2673  * @privilege %http://developer.samsung.com/tizen/privilege/mdm.device
2674  *
2675  * @return #mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
2676  *
2677  * @retval #MDM_RESULT_SUCCESS Successful
2678  * @retval #MDM_RESULT_FAIL General failure
2679  * @retval #MDM_RESULT_NOT_SUPPORTED Not supported
2680  * @retval #MDM_RESULT_INVALID_PARAM Invalid parameter
2681  * @retval #MDM_RESULT_ACCESS_DENIED The application does not have the privilege to call this function.
2682  *
2683  * @par Permission:
2684  * Usage of this API is restricted to registered clients only.
2685  *
2686  * @see mdm_get_inbound_sms_captured, mdm_outbound_sms_captured
2687  */
2688 mdm_result_t mdm_msim_clear_sms_captured(const char *id);
2689 
2690 /*
2691  * @brief API to enable or disable call capture for a specific SIM card.
2692  *
2693  * @since_mdm 1.1.0
2694  *
2695  * @since_tizen 2.2.1.1
2696  *
2697  * @feature %http://developer.samsung.com/tizen/feature/mdm
2698  *
2699  * @par Usage:
2700  * Admin can use this API to enable or disable logging of calls for a specific SIM card.
2701  * When logging is enabled, a direction ('From'/'To'), a phone number, type (such as "Outgoing video call"),
2702  * duration of the call and timestamp will be saved. The audio <b>won't</b> be saved.
2703  *
2704  * @code{.c}
2705 
2706  mdm_result_t ret = mdm_msim_enable_call_capture("SIM1", MDM_ENABLED);
2707  if (ret == MDM_RESULT_SUCCESS) {
2708  // Success
2709  }
2710 
2711  * @endcode
2712  *
2713  * @privlevel public
2714  * @privilege %http://developer.samsung.com/tizen/privilege/mdm.device
2715  *
2716  * @param[in] id SIM card id. Check mdm_msim_get_sim_ids() for available SIM card ids.
2717  * @param[in] status #MDM_ENABLED to enable call capture, #MDM_DISABLED to disable it.
2718  *
2719  * @return #mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
2720  *
2721  * @retval #MDM_RESULT_SUCCESS Successful
2722  * @retval #MDM_RESULT_FAIL General failure
2723  * @retval #MDM_RESULT_NOT_SUPPORTED Not supported
2724  * @retval #MDM_RESULT_INVALID_PARAM Invalid parameter
2725  * @retval #MDM_RESULT_ACCESS_DENIED The application does not have the privilege to call this function.
2726  *
2727  * @par Permission:
2728  * Usage of this API is restricted to registered clients only.
2729  *
2730  * @see mdm_msim_is_call_capture_enabled, mdm_msim_get_incoming_call_captured,
2731  * mdm_msim_outgoing_call_captured, mdm_msim_clear_call_captured
2732  */
2733 mdm_result_t mdm_msim_enable_call_capture(const char *id, mdm_status_t status);
2734 
2735 /*
2736  * @brief API to check whether call capture is enabled or disabled for a specific SIM card.
2737  *
2738  * @since_mdm 1.1.0
2739  *
2740  * @since_tizen 2.2.1.1
2741  *
2742  * @feature %http://developer.samsung.com/tizen/feature/mdm
2743  *
2744  * @par Usage:
2745  * Used by admin to check whether the call capture is enabled or disabled for a specific SIM card.
2746  *
2747  * @code{.c}
2748 
2749  mdm_status_t ret = mdm_is_call_capture_enabled("SIM1");
2750  if (ret == MDM_ENABLED) {
2751  // Call capture is enabled.
2752  }
2753 
2754  * @endcode
2755  *
2756  * @param[in] id SIM card id. Check mdm_msim_get_sim_ids() for available SIM card ids.
2757  *
2758  * @return #mdm_status_t : Whether call capture is enalbed
2759  *
2760  * @retval #MDM_ENABLED Call capture is enabled
2761  * @retval #MDM_DISABLED Call capture is disabled
2762  * @retval #MDM_STATUS_ERROR Fail
2763  *
2764  * @see mdm_msim_enable_call_capture, mdm_msim_get_incoming_call_captured,
2765  * mdm_msim_outgoing_call_captured, mdm_msim_clear_call_captured
2766  */
2767 mdm_status_t mdm_msim_is_call_capture_enabled(const char *id);
2768 
2769 /*
2770  * @brief API to retrieve the incoming calls capture log for a specific SIM card.
2771  *
2772  * @since_mdm 1.1.0
2773  *
2774  * @since_tizen 2.2.1.1
2775  *
2776  * @feature %http://developer.samsung.com/tizen/feature/mdm
2777  *
2778  * @par Usage:
2779  * Used by admin to get the incoming calls captured log for a specific SIM card.
2780  * Call capture has to be enabled with mdm_msim_enable_call_capture().
2781  * Each String entry in the list will be of the following format
2782  * "To:XXX - From:XXX - TimeStamp:XXX - Duration:XXX - Call type:XXX - IMSI:XXX - ICCID:XXX - IMEI:XXX - Roaming
2783  State:XXX"
2784  *
2785  * @code{.c}
2786 
2787  mdm_data_t *mdm_data = mdm_msim_get_incoming_call_captured("SIM1");
2788  if (mdm_data != NULL && mdm_data->ret == MDM_RESULT_SUCCESS) {
2789 
2790  GList *current = g_list_first((GList *) mdm_data->data);
2791  while (current && current->data) {
2792  char *captured = (char *) current->data;
2793  printf("%s\n", captured);
2794  current = g_list_next(current);
2795  }
2796  }
2797  mdm_free_data(mdm_data);
2798 
2799  * @endcode
2800  *
2801  * @param[in] id SIM card id. Check mdm_msim_get_sim_ids() for available SIM card ids.
2802  *
2803  * @return A list of all incoming call capture logs for a specific SIM card.
2804  * On error sets mdm_data_t::ret, only in case of memory allocation error may return NULL.
2805  *
2806  * @see mdm_msim_enable_call_capture, mdm_msim_is_call_capture_enabled,
2807  * mdm_msim_outgoing_call_captured, mdm_msim_clear_call_captured
2808  */
2809 mdm_data_t *mdm_msim_get_incoming_call_captured(const char *id);
2810 
2811 /*
2812  * @brief API to retrieve the outgoing calls capture log for a specific SIM card.
2813  *
2814  * @since_mdm 1.1.0
2815  *
2816  * @since_tizen 2.2.1.1
2817  *
2818  * @feature %http://developer.samsung.com/tizen/feature/mdm
2819  *
2820  * @par Usage:
2821  * Used by admin to get the outgoing calls captured log for a specific SIM card.
2822  * Call capture has to be enabled with mdm_msim_enable_call_capture().
2823  * Each String entry in the list will be of the following format
2824  * "To:XXX - From:XXX - TimeStamp:XXX - Duration:XXX - Call type:XXX - IMSI:XXX - ICCID:XXX - IMEI:XXX - Roaming
2825  State:XXX"
2826  *
2827  * @code{.c}
2828 
2829  mdm_data_t *mdm_data = mdm_msim_get_outgoing_call_captured("SIM1");
2830  if (mdm_data != NULL && mdm_data->ret == MDM_RESULT_SUCCESS) {
2831 
2832  GList *current = g_list_first((GList *) mdm_data->data);
2833  while (current && current->data) {
2834  char *captured = (char *) current->data;
2835  printf("%s\n", captured);
2836  current = g_list_next(current);
2837  }
2838  }
2839  mdm_free_data(mdm_data);
2840 
2841  * @endcode
2842  *
2843  * @param[in] id SIM card id. Check mdm_msim_get_sim_ids() for available SIM card ids.
2844  *
2845  * @return A list of all outgoing call capture logs for a specific SIM card.
2846  * On error sets mdm_data_t::ret, only in case of memory allocation error may return NULL.
2847  *
2848  * @see mdm_msim_enable_call_capture, mdm_msim_is_call_capture_enabled,
2849  * mdm_msim_incoming_call_captured, mdm_msim_clear_call_captured
2850  */
2851 mdm_data_t *mdm_msim_get_outgoing_call_captured(const char *id);
2852 
2853 /*
2854  * @brief API to clear the call capture logs for a specific SIM card.
2855  *
2856  * @since_mdm 1.1.0
2857  *
2858  * @since_tizen 2.2.1.1
2859  *
2860  * @feature %http://developer.samsung.com/tizen/feature/mdm
2861  *
2862  * @par Usage:
2863  * Used by admin to clear the call capture logs on device.
2864  *
2865  * @code{.c}
2866 
2867  mdm_result_t ret = mdm_clear_call_captured("SIM1");
2868  if (ret == MDM_RESULT_SUCCESS) {
2869  // Succeeded
2870  }
2871 
2872  * @endcode
2873  *
2874  * @param[in] id SIM card id. Check mdm_msim_get_sim_ids() for available SIM card ids.
2875  *
2876  * @privlevel public
2877  * @privilege %http://developer.samsung.com/tizen/privilege/mdm.device
2878  *
2879  * @return #mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
2880  *
2881  * @retval #MDM_RESULT_SUCCESS Successful
2882  * @retval #MDM_RESULT_FAIL General failure
2883  * @retval #MDM_RESULT_NOT_SUPPORTED Not supported
2884  * @retval #MDM_RESULT_INVALID_PARAM Invalid parameter
2885  * @retval #MDM_RESULT_ACCESS_DENIED The application does not have the privilege to call this function.
2886  *
2887  * @par Permission:
2888  * Usage of this API is restricted to registered clients only.
2889  *
2890  * @see mdm_get_incoming_call_captured, mdm_outgoing_call_captured
2891  */
2892 mdm_result_t mdm_msim_clear_call_captured(const char *id);
2893 
2894 #endif /* MDM_FOR_SOLIS_PROF */
2895 
2927 MDM_DEPRECATED_API mdm_data_t *mdm_get_device_processor_type(void);
2928 
2968 MDM_DEPRECATED_API mdm_result_t mdm_get_total_ram_memory(int *memory);
2969 
3010 MDM_DEPRECATED_API mdm_result_t mdm_get_available_ram_memory(int *memory);
3011 
3012 /*
3013  * @brief API to check if device was rooted by the user.
3014  *
3015  * @since_mdm 1.1.0
3016  *
3017  * @since_tizen 2.4.0.4
3018  *
3019  * @feature %http://developer.samsung.com/tizen/feature/mdm
3020  *
3021  * @par Usage:
3022  * Used by admin to check if the device is rooted.
3023  *
3024  * @code{.c}
3025  mdm_status_t ret = mdm_is_device_rooted();
3026  if (ret != MDM_STATUS_ERROR) {
3027  if (ret == MDM_TRUE) {
3028  // Device is rooted
3029  } else {
3030  // Device is not rooted
3031  }
3032  } else {
3033  // Failure
3034  }
3035 
3036  * @endcode
3037  *
3038  * @return #mdm_status_t : Whether the device is rooted
3039  *
3040  * @retval #MDM_TRUE Device is rooted
3041  * @retval #MDM_FALSE Device is not rooted
3042  * @retval #MDM_STATUS_ERROR Failure
3043  *
3044  */
3045 mdm_status_t mdm_is_device_rooted(void);
3046 
3080 
3081 #ifndef MDM_FOR_SOLIS_PROF
3082 
3083 /*
3084  * @brief API to get the standardized (ISO) country code of the SIM provider.
3085  *
3086  * @since_mdm 1.1.0
3087  *
3088  * @since_tizen 2.2.1.1
3089  *
3090  * @feature %http://developer.samsung.com/tizen/feature/mdm
3091  *
3092  * @par Usage:
3093  * Admin can get the standardized (ISO) country code of the SIM provider.
3094  *
3095  * @code{.c}
3096 
3097  mdm_data_t *lp_data = NULL;
3098  lp_data = mdm_msim_get_sim_country_iso("SIM1");
3099  if (lp_data) {
3100  char *sim_mcc_iso = (char *)lp_data->data;
3101  if(sim_iso != NULL) {
3102  printf("sim country iso : %s", sim_mcc_iso);
3103  }
3104 
3105  // free after use
3106  mdm_free_data(lp_data);
3107  }
3108 
3109  * @endcode
3110  *
3111  * @param[in] id SIM card id. Check mdm_msim_get_sim_ids() for available SIM card ids.
3112  *
3113  * @return #mdm_data_t * :The standardized (ISO) country code of the SIM operator on success, NULL on error.
3114  *
3115  */
3116 mdm_data_t *mdm_msim_get_sim_country_iso(const char *id);
3117 
3118 /*
3119  * @brief API to get the status of the specific device SIM card.
3120  *
3121  * @since_mdm 1.1.0
3122  *
3123  * @since_tizen 2.2.1.1
3124  *
3125  * @feature %http://developer.samsung.com/tizen/feature/mdm
3126  *
3127  * @par Usage:
3128  * Admin can get the status of a device SIM card.
3129  *
3130  * @code{.c}
3131 
3132  mdm_sim_status_t sim_status = mdm_msim_get_sim_state("SIM1");
3133  if (sim_status != MDM_SIM_STATUS_ERROR) {
3134  // Failure
3135  } else {
3136  // Success
3137  // Use sim_status value
3138  }
3139 
3140  * @endcode
3141  *
3142  * @param[in] id SIM card id. Check mdm_msim_get_sim_ids() for available SIM card ids.
3143  *
3144  * @return #mdm_sim_status_t : The status of the device SIM card on success, MDM_SIM_STATUS_ERROR on failure.
3145  *
3146  * @retval #MDM_SIM_STATUS_ERROR Error
3147  * @retval #MDM_SIM_STATUS_CARD_ERROR Bad card/On the fly SIM gone bad
3148  * @retval #MDM_SIM_STATUS_CARD_NOT_PRESENT Card not present
3149  * @retval #MDM_SIM_STATUS_SIM_INITIALIZING SIM is in Initializing state
3150  * @retval #MDM_SIM_STATUS_SIM_INIT_COMPLETED SIM Initialization OK
3151  * @retval #MDM_SIM_STATUS_SIM_PIN_REQUIRED PIN required state
3152  * @retval #MDM_SIM_STATUS_SIM_PUK_REQUIRED PUK required state
3153  * @retval #MDM_SIM_STATUS_CARD_BLOCKED PIN/PUK blocked(permanently blocked- All the attempts for PIN/PUK
3154  failed)
3155  * @retval #MDM_SIM_STATUS_SIM_NCK_REQUIRED Network Control Key required state
3156  * @retval #MDM_SIM_STATUS_SIM_NSCK_REQUIRED Network Subset Control Key required state
3157  * @retval #MDM_SIM_STATUS_SIM_SPCK_REQUIRED Service Provider Control Key required state
3158  * @retval #MDM_SIM_STATUS_SIM_CCK_REQUIRED Corporate Control Key required state
3159  * @retval #MDM_SIM_STATUS_CARD_REMOVED Card removed
3160  * @retval #MDM_SIM_STATUS_SIM_LOCK_REQUIRED PH-SIM (Phone-SIM) locked state
3161  *
3162  * @see mdm_sim_status_t
3163  *
3164  */
3165 mdm_sim_status_t mdm_msim_get_sim_state(const char *id);
3166 
3167 /*
3168  * @brief API to get the radio technology (Network Type) that is currently being used on the device.
3169  *
3170  * @since_mdm 1.1.0
3171  *
3172  * @since_tizen 2.2.1.1
3173  *
3174  * @feature %http://developer.samsung.com/tizen/feature/mdm
3175  *
3176  * @par Usage:
3177  * Admin can check the radio technology (Network Type) that is currently being used on the device for data transmission.
3178  *
3179  * @code{.c}
3180 
3181  mdm_network_service_type_t network_type = MDM_NETWORK_SERVICE_ERR;
3182 
3183  network_type = mdm_msim_get_network_type("SIM1");
3184  if (network_type != MDM_NETWORK_SERVICE_ERR) {
3185  // Success
3186  } else {
3187  // Failure
3188  }
3189 
3190  * @endcode
3191  *
3192  * @param[in] id SIM card id. Check mdm_msim_get_sim_ids() for available SIM card ids.
3193  *
3194  * @return #mdm_network_service_type_t : network type on sucess, MDM_NETWORK_SERVICE_ERR on failure.
3195  *
3196  * @retval #MDM_NETWORK_SERVICE_ERR Error
3197  * @retval #MDM_NETWORK_SERVICE_NO_SRV No Service available
3198  * @retval #MDM_NETWORK_SERVICE_GSM GSM
3199  * @retval #MDM_NETWORK_SERVICE_GPRS GPRS
3200  * @retval #MDM_NETWORK_SERVICE_EGPRS EGPRS
3201  * @retval #MDM_NETWORK_SERVICE_PCS1900 PCS1900
3202  * @retval #MDM_NETWORK_SERVICE_UMTS UMTS
3203  * @retval #MDM_NETWORK_SERVICE_GSM_AND_UMTS GSM/UMTS
3204  * @retval #MDM_NETWORK_SERVICE_HSDPA HSDPA
3205  * @retval #MDM_NETWORK_SERVICE_IS95A IS95A
3206  * @retval #MDM_NETWORK_SERVICE_IS95B IS95B
3207  * @retval #MDM_NETWORK_SERVICE_CDMA_1X CDMA 1X
3208  * @retval #MDM_NETWORK_SERVICE_EVDO_REV_0 EV-DO rev0
3209  * @retval #MDM_NETWORK_SERVICE_1X_EVDO_REV_0_HYBRID 1X/EV-DO rev0
3210  * @retval #MDM_NETWORK_SERVICE_EVDO_REV_A EV-DO revA
3211  * @retval #MDM_NETWORK_SERVICE_1X_EVDO_REV_A_HYBRID 1X/EV-DO revA
3212  * @retval #MDM_NETWORK_SERVICE_EVDO_REV_B EV-DO revB
3213  * @retval #MDM_NETWORK_SERVICE_1X_EVDO_REV_B_HYBRID 1X/EV-DO revB
3214  * @retval #MDM_NETWORK_SERVICE_EVDV EV-DV
3215  * @retval #MDM_NETWORK_SERVICE_EHRPD EHRPD
3216  * @retval #MDM_NETWORK_SERVICE_LTE LTE
3217  *
3218  * @see mdm_msim_network_service_type_t
3219  *
3220  */
3221 mdm_network_service_type_t mdm_msim_get_network_type(const char *id);
3222 
3223 
3224 /*
3225  * @brief API to get phone number associated a specific SIM card.
3226  *
3227  * @since_mdm 1.1.0
3228  *
3229  * @since_tizen 2.2.1.1
3230  *
3231  * @feature %http://developer.samsung.com/tizen/feature/mdm
3232  *
3233  * @par Usage:
3234  * Admin can get the phone number associated with the first line of the device. For example, the MSISDN for a GSM phone.
3235  * Returns null if it is unavailable.
3236  *
3237  * @code{.c}
3238 
3239  mdm_data_t *lp_data = mdm_msim_get_subscriber_number("SIM1");
3240  if (lp_data) {
3241  char *phone_number = (char *)lp_data->data;
3242  if(name != NULL) {
3243  printf("subscriber number : %s", phone_number);
3244  }
3245 
3246  // free after use
3247  mdm_free_data(lp_data);
3248  }
3249 
3250  * @endcode
3251  *
3252  * @param[in] id SIM card id. Check mdm_msim_get_sim_ids() for available SIM card ids.
3253  *
3254  * @return #mdm_data_t * : The phone number associated with the device on success,
3255  * NULL on error, or if the phone number is unavailable
3256  *
3257  */
3258 mdm_data_t *mdm_msim_get_subscriber_number(const char *id);
3259 
3260 
3261 /*
3262  * @brief API to get the Service Provider Name (SPN) if SIM is available on the device.
3263  *
3264  * @since_mdm 1.1.0
3265  *
3266  * @since_tizen 2.2.1.1
3267  *
3268  * @feature %http://developer.samsung.com/tizen/feature/mdm
3269  *
3270  * @par Usage:
3271  * Admin can get the Service Provider Name (SPN) if available.
3272  *
3273  * @note Some SIM types don't offer SPN.
3274  * Regarding the 3GPP specification, this value is optional.
3275  * If SPN is not stored on the SIM card this function will return NULL.
3276  *
3277  * @code{.c}
3278 
3279  mdm_data_t *lp_data = NULL;
3280 
3281  lp_data = mdm_msim_get_sim_operator_name("SIM1");
3282  if (lp_data && lp_data->data) {
3283  char *name = (char *)lp_data->data;
3284  if(name != NULL) {
3285  printf("SIM operator name: %s\n", name);
3286  } else {
3287  printf("SIM operator name is unavailable\n");
3288  }
3289 
3290  // free after use
3291  mdm_free_data(lp_data);
3292  }
3293 
3294  * @endcode
3295  *
3296  * @param[in] id SIM card id. Check mdm_msim_get_sim_ids() for available SIM card ids.
3297  *
3298  * @return #mdm_data_t * : The Service Provider Name (SPN) on success,
3299  * NULL on error, or if the SPN is not available
3300  *
3301  * @see mdm_msim_get_sim_operator
3302  */
3303 mdm_data_t *mdm_msim_get_sim_operator_name(const char *id);
3304 
3305 /*
3306  * @brief API to get the numeric name (MCC+MNC) of the current registered network operator.
3307  *
3308  * @since_mdm 1.1.0
3309  *
3310  * @since_tizen 2.2.1.1
3311  *
3312  * @feature %http://developer.samsung.com/tizen/feature/mdm
3313  *
3314  * @par Usage:
3315  * Admin can get the numeric name (MCC+MNC) of the current registered network operator for specific SIM
3316  * The numeric name of the network operator will be available only if the user's device is registered to a network.
3317  *
3318  * @code{.c}
3319 
3320  mdm_data_t *lp_data = NULL;
3321 
3322  lp_data = mdm_msim_get_network_operator("SIM1");
3323  if (lp_data) {
3324  char *operator_number = (char *)lp_data->data;
3325  if(no != NULL) {
3326  printf("network operator : %s", operator_number);
3327  }
3328 
3329  // free after use
3330  mdm_free_data(lp_data);
3331  }
3332 
3333  * @endcode
3334  *
3335  * @param[in] id SIM card id. Check mdm_msim_get_sim_ids() for available SIM card ids.
3336  *
3337  * @return #mdm_data_t * : The numeric name (MCC+MNC) of the network operator on success,
3338  * NULL on error, or if the device is not registered to any network
3339  *
3340  * @see mdm_msim_get_network_operator_name
3341  */
3342 mdm_data_t *mdm_msim_get_network_operator(const char *id);
3343 
3344 /*
3345  * @brief API to get the alphanumeric name of current registered network operator.
3346  *
3347  * @since_mdm 1.1.0
3348  *
3349  * @since_tizen 2.2.1.1
3350  *
3351  * @feature %http://developer.samsung.com/tizen/feature/mdm
3352  *
3353  * @par Usage:
3354  * Admin can get the alphanumeric name of the current registered network operator.
3355  * The alphanumeric name of the network operator will be available only if the device is registered to a network.
3356  *
3357  * @code{.c}
3358 
3359  mdm_data_t *lp_data = NULL;
3360 
3361  lp_data = mdm_msim_get_network_operator_name("SIM1");
3362  if (lp_data) {
3363  char *operator_name = (char *)lp_data->data;
3364  if(name != NULL) {
3365  printf("network operator name : %s", operator_name);
3366  }
3367 
3368  // free after use
3369  mdm_free_data(lp_data);
3370  }
3371 
3372  * @endcode
3373  *
3374  * @param[in] id SIM card id. Check mdm_msim_get_sim_ids() for available SIM card ids.
3375  *
3376  * @return #mdm_data_t * : The alphanumeric name of the network operator on success,
3377  * NULL on error, or if the device is not registered to any network
3378  *
3379  * @see mdm_msim_get_network_operator
3380  */
3381 mdm_data_t *mdm_msim_get_network_operator_name(const char *id);
3382 
3383 /*
3384  * @brief API to get the numeric name (MCC+MNC) of the SIM operator.
3385  *
3386  * @since_mdm 1.1.0
3387  *
3388  * @since_tizen 2.2.1.1
3389  *
3390  * @feature %http://developer.samsung.com/tizen/feature/mdm
3391  *
3392  * @par Usage:
3393  * Admin can get the MCC+MNC (mobile country code + mobile network code)
3394  * of the SIM operator. Equals to 5 or 6 decimal digits.
3395  * @code{.c}
3396 
3397  mdm_data_t *lp_data = NULL;
3398  lp_data = mdm_msim_get_sim_operator("SIM1");
3399  if (lp_data) {
3400  char *sim_op = (char *)lp_data->data;
3401  if(sim_op != NULL) {
3402  printf("sim operator : %s", sim_op);
3403  }
3404 
3405  // free after use
3406  mdm_free_data(lp_data);
3407  }
3408 
3409  * @endcode
3410  *
3411  * @param[in] id SIM card id. Check mdm_msim_get_sim_ids() for available SIM card ids.
3412  *
3413  * @return #mdm_data_t * : The numeric name (MCC+MNC) of the SIM operator on success, NULL on error.
3414  *
3415  * @see mdm_msim_get_sim_operator_name
3416  */
3417 mdm_data_t *mdm_msim_get_sim_operator(const char *id);
3418 
3419 /*
3420  * @brief Retrieves the model firmware version of the device
3421  *
3422  * @since_mdm 1.1.0
3423  *
3424  * @since_tizen 2.2.1.1
3425  *
3426  * @feature %http://developer.samsung.com/tizen/feature/mdm
3427  *
3428  * @par Usage:
3429  * Used by admin to get the firmware version of the device
3430  *
3431  * @code{.c}
3432 
3433  mdm_data_t *lp_data = NULL;
3434  lp_data = mdm_msim_get_modem_firmware("SIM1");
3435  if (lp_data) {
3436  char *data = (char *)lp_data->data;
3437  if(data != NULL) {
3438  printf("firmware version : %s\n", data);
3439  }
3440  mdm_free_data(lp_data);
3441  }
3442 
3443  * @endcode
3444  *
3445  * @return #mdm_data_t * : Firmware version as string. If modem version is set, then actual modem version will be
3446  returned, otherwise null value will be returned.
3447  *
3448  */
3449 mdm_data_t *mdm_msim_get_modem_firmware(const char *simid);
3450 
3451 
3452 /*
3453  * @brief API to retrieve the number of calls completed successfully on the device for a specific SIM card.
3454  *
3455  * @since_mdm 1.1.0
3456  *
3457  * @since_tizen 2.4.0.4
3458  *
3459  * @feature %http://developer.samsung.com/tizen/feature/mdm
3460  *
3461  * @par Usage:
3462  * Used by admin to get the number of calls completed successfully on the device.
3463  *
3464  * @code{.c}
3465  int count;
3466  mdm_result_t ret = mdm_get_success_calls_count("SIM1", &count);
3467  if (ret == MDM_RESULT_SUCCESS) {
3468  //locked
3469  printf("Count : %d\n", count);
3470  }
3471 
3472  * @endcode
3473  *
3474  * @param[in] id SIM card id. Check mdm_msim_get_sim_ids() for available SIM card ids.
3475  * @param[out] count Number of successful calls.
3476  *
3477  * @return #mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
3478  *
3479  * @retval #MDM_RESULT_SUCCESS Successful
3480  * @retval #MDM_RESULT_FAIL General failure
3481  * @retval #MDM_RESULT_NOT_SUPPORTED Not supported
3482  * @retval #MDM_RESULT_INVALID_PARAM Invalid parameter
3483  * @retval #MDM_RESULT_ACCESS_DENIED The application does not have the privilege to call this function.
3484  *
3485  * @see mdm_msim_get_missed_calls_count, mdm_msim_get_rejected_calls_count,
3486  * mdm_msim_get_blocked_calls_count, mdm_msim_reset_calls_count
3487  *
3488  */
3489 mdm_result_t mdm_msim_get_success_calls_count(const char *id, int *count);
3490 
3491 /*
3492  * @brief API to retrieve the number of missed calls on the device
3493  *
3494  * @since_mdm 1.1.0
3495  *
3496  * @since_tizen 2.4.0.4
3497  *
3498  * @feature %http://developer.samsung.com/tizen/feature/mdm
3499  *
3500  * @par Usage:
3501  * Used by admin to get the number of missed calls on the device
3502  *
3503  * @code{.c}
3504  int count;
3505  mdm_result_t ret = mdm_msim_get_missed_calls_count("SIM1", &count);
3506  if (ret == MDM_RESULT_SUCCESS) {
3507  //locked
3508  printf("Count : %d\n", count);
3509  }
3510 
3511  * @endcode
3512  *
3513  * @param[in] id SIM card id. Check mdm_msim_get_sim_ids() for available SIM card ids.
3514  * @param[out] count Number of missed calls.
3515  *
3516  * @return #mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
3517  *
3518  * @retval #MDM_RESULT_SUCCESS Successful
3519  * @retval #MDM_RESULT_FAIL General failure
3520  * @retval #MDM_RESULT_NOT_SUPPORTED Not supported
3521  * @retval #MDM_RESULT_INVALID_PARAM Invalid parameter
3522  * @retval #MDM_RESULT_ACCESS_DENIED The application does not have the privilege to call this function.
3523  *
3524  * @see mdm_msim_get_success_calls_count, mdm_msim_get_rejected_calls_count,
3525  * mdm_msim_get_blocked_calls_count, mdm_msim_reset_calls_count
3526  *
3527  */
3528 mdm_result_t mdm_msim_get_missed_calls_count(const char *id, int *count);
3529 
3530 /*
3531  * @brief API to retrieve the number of rejected calls on the device
3532  *
3533  * @since_mdm 1.1.0
3534  *
3535  * @since_tizen 2.4.0.4
3536  *
3537  * @feature %http://developer.samsung.com/tizen/feature/mdm
3538  *
3539  * @par Usage:
3540  * Used by admin to get the number of rejected calls on the device
3541  *
3542  * @code{.c}
3543  int count;
3544  mdm_result_t ret = mdm_msim_get_rejected_calls_count("SIM1", &count);
3545  if (ret == MDM_RESULT_SUCCESS) {
3546  //locked
3547  printf("Count : %d\n", count);
3548  }
3549 
3550  * @endcode
3551  *
3552  * @param[in] id SIM card id. Check mdm_msim_get_sim_ids() for available SIM card ids.
3553  * @param[out] count Number of rejected calls.
3554  *
3555  * @return #mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
3556  *
3557  * @retval #MDM_RESULT_SUCCESS Successful
3558  * @retval #MDM_RESULT_FAIL General failure
3559  * @retval #MDM_RESULT_NOT_SUPPORTED Not supported
3560  * @retval #MDM_RESULT_INVALID_PARAM Invalid parameter
3561  * @retval #MDM_RESULT_ACCESS_DENIED The application does not have the privilege to call this function.
3562  *
3563  * @see mdm_msim_get_success_calls_count, mdm_msim_get_missed_calls_count,
3564  * mdm_msim_get_blocked_calls_count, mdm_msim_reset_calls_count
3565  *
3566  */
3567 mdm_result_t mdm_msim_get_rejected_calls_count(const char *id, int *count);
3568 
3569 /*
3570  * @brief API to retrieve the number of blocked calls on the device
3571  *
3572  * @since_mdm 1.1.0
3573  *
3574  * @since_tizen 2.4.0.4
3575  *
3576  * @feature %http://developer.samsung.com/tizen/feature/mdm
3577  *
3578  * @par Usage:
3579  * Used by admin to get the number of blocked calls on the device
3580  *
3581  * @code{.c}
3582  int count;
3583  mdm_result_t ret = mdm_msim_get_blocked_calls_count("SIM1", &count);
3584  if (ret == MDM_RESULT_SUCCESS) {
3585  //locked
3586  printf("Count : %d\n", count);
3587  }
3588 
3589  * @endcode
3590  *
3591  * @param[in] id SIM card id. Check mdm_msim_get_sim_ids() for available SIM card ids.
3592  * @param[out] count Number of blocked calls.
3593  *
3594  * @return #mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
3595  *
3596  * @retval #MDM_RESULT_SUCCESS Successful
3597  * @retval #MDM_RESULT_FAIL General failure
3598  * @retval #MDM_RESULT_NOT_SUPPORTED Not supported
3599  * @retval #MDM_RESULT_INVALID_PARAM Invalid parameter
3600  * @retval #MDM_RESULT_ACCESS_DENIED The application does not have the privilege to call this function.
3601  *
3602  * @see mdm_msim_get_success_calls_count, mdm_msim_get_missed_calls_count,
3603  * mdm_msim_get_rejected_calls_count, mdm_msim_reset_calls_count
3604  *
3605  */
3606 mdm_result_t mdm_msim_get_blocked_calls_count(const char *id, int *count);
3607 
3608 /*
3609  * @brief API to reset the counters related to calls count for a specific SIM
3610  * card.
3611  *
3612  * @since_mdm 1.1.0
3613  *
3614  * @since_tizen 2.4.0.4
3615  *
3616  * @feature %http://developer.samsung.com/tizen/feature/mdm
3617  *
3618  * @par Usage:
3619  * Used by admin to reset the counters related to calls count.
3620  *
3621  * @code{.c}
3622  mdm_result_t ret = mdm_msim_reset_calls_count("SIM1");
3623  if (ret == MDM_RESULT_SUCCESS) {
3624  //Success
3625  }
3626 
3627  * @endcode
3628  *
3629  * @privlevel public
3630  * @privilege %http://developer.samsung.com/tizen/privilege/mdm.device
3631  *
3632  * @return #mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
3633  *
3634  * @retval #MDM_RESULT_SUCCESS Successful
3635  * @retval #MDM_RESULT_FAIL General failure
3636  * @retval #MDM_RESULT_NOT_SUPPORTED Not supported
3637  * @retval #MDM_RESULT_INVALID_PARAM Invalid parameter
3638  * @retval #MDM_RESULT_ACCESS_DENIED The application does not have the privilege to call this function.
3639  *
3640  * @par Permission:
3641  * Usage of this API is restricted to registered clients only.
3642  *
3643  * @see mdm_msim_get_success_calls_count, mdm_msim_get_missed_calls_count,
3644  * mdm_msim_get_rejected_calls_count, mdm_msim_get_blocked_calls_count
3645  *
3646  */
3647 mdm_result_t mdm_msim_reset_calls_count(const char *simid);
3648 
3649 /*
3650  * @brief API used to enable logging of cellular data network statistics on the device for a specific SIM card.
3651  *
3652  * @since_mdm 1.1.0
3653  *
3654  * @since_tizen 2.4.0.4
3655  *
3656  * @feature %http://developer.samsung.com/tizen/feature/mdm
3657  *
3658  * @par Usage:
3659  * An administrator can use this API to enable logging the number of cellular data network bytes received or sent.
3660  * If the device is managed by multiple administrators, logging is enabled if at least one administrator enables it.
3661  * Logging is disabled only if all administrators disable it.
3662  *
3663  * @code{.c}
3664  mdm_result_t ret = mdm_msim_enable_data_call_statistics("SIM1", MDM_ENABLED);
3665  if (ret == MDM_RESULT_SUCCESS) {
3666  //Success
3667  }
3668 
3669  * @endcode
3670  *
3671  * @privlevel public
3672  * @privilege %http://developer.samsung.com/tizen/privilege/mdm.device
3673  *
3674  * @param[in] id SIM card id. Check mdm_msim_get_sim_ids() for available SIM card ids.
3675  * @param[in] status #MDM_ENABLED if the device shall store the data call statistics (count amount of data).
3676  *
3677  * @return #mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
3678  *
3679  * @retval #MDM_RESULT_SUCCESS Successful
3680  * @retval #MDM_RESULT_FAIL General failure
3681  * @retval #MDM_RESULT_NOT_SUPPORTED Not supported
3682  * @retval #MDM_RESULT_INVALID_PARAM Invalid parameter
3683  * @retval #MDM_RESULT_ACCESS_DENIED The application does not have the privilege to call this function.
3684  *
3685  * @par Permission:
3686  * Usage of this API is restricted to registered clients only.
3687  *
3688  * @see mdm_msim_is_data_call_statistics_enabled, mdm_msim_get_bytes_sent_network,
3689  * mdm_msim_get_bytes_received_network
3690  *
3691  */
3692 mdm_result_t mdm_msim_enable_data_call_statistics(const char *id, mdm_status_t status);
3693 
3694 /*
3695  * @brief API to determine whether cellular data network statistics logging is enabled.
3696  *
3697  * @since_mdm 1.1.0
3698  *
3699  * @since_tizen 2.4.0.4
3700  *
3701  * @feature %http://developer.samsung.com/tizen/feature/mdm
3702  *
3703  * @par Usage:
3704  * An administrator can use this API to verify whether carrier data statistics logging is enabled on the device.
3705  * For a device managed by multiple administrators, logging is enabled if at least one administrator has enabled it.
3706  * Logging is disabled only if all administrators have disabled logging.
3707  *
3708  * @code{.c}
3709  mdm_status_t ret = mdm_msim_is_data_call_statistics_enabled("SIM1");
3710  if (ret == MDM_TRUE) {
3711  //Enabled
3712  }
3713 
3714  * @endcode
3715  *
3716  * @param[in] id SIM card id. Check mdm_msim_get_sim_ids() for available SIM card ids.
3717  *
3718  * @return #mdm_status_t : Whether carrier data call statistics are enabled
3719  *
3720  * @retval #MDM_TRUE Data call statistics is enabled
3721  * @retval #MDM_FALSE Data call statistics is disabled
3722  *
3723  * @see mdm_msim_enable_data_call_statistics, mdm_msim_get_bytes_sent_network,
3724  * mdm_msim_get_bytes_received_network
3725  */
3726 mdm_status_t mdm_msim_is_data_call_statistics_enabled(const char *id);
3727 
3728 /*
3729  * @brief API to retrieve the amount of bytes sent through network connection
3730  * for a specific SIM card.
3731  *
3732  * @since_mdm 1.1.0
3733  *
3734  * @since_tizen 2.4.0.4
3735  *
3736  * @feature %http://developer.samsung.com/tizen/feature/mdm
3737  *
3738  * @par Usage:
3739  * Used by admin to get the amount of bytes sent to cellular network connection.
3740  *
3741  * @code{.c}
3742  long long bytes;
3743  mdm_result_t ret = mdm_msim_get_bytes_sent_network("SIM1", &bytes);
3744  if (ret == MDM_RESULT_SUCCESS) {
3745  //Success
3746  }
3747 
3748  * @endcode
3749  *
3750  * @param[in] id SIM card id. Check mdm_msim_get_sim_ids() for available SIM card ids.
3751  * @param[out] bytes The amount of bytes sent through network connection.
3752  *
3753  * @return #mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
3754  *
3755  * @retval #MDM_RESULT_SUCCESS Successful
3756  * @retval #MDM_RESULT_FAIL General failure
3757  * @retval #MDM_RESULT_NOT_SUPPORTED Not supported
3758  * @retval #MDM_RESULT_INVALID_PARAM Invalid parameter
3759  * @retval #MDM_RESULT_ACCESS_DENIED The application does not have the privilege to call this function.
3760 
3761  *
3762  * @see mdm_msim_enable_data_call_statistics, mdm_msim_is_data_call_statistics_enabled,
3763  mdm_msim_get_bytes_received_network
3764  *
3765  */
3766 mdm_result_t mdm_msim_get_bytes_sent_network(const char *id, long long *bytes);
3767 
3768 /*
3769  * @brief API to retrieve the amount of bytes received from network connection
3770  * for a specific SIM card.
3771  *
3772  * @since_mdm 1.1.0
3773  *
3774  * @since_tizen 2.4.0.4
3775  *
3776  * @feature %http://developer.samsung.com/tizen/feature/mdm
3777  *
3778  * @par Usage:
3779  * Used by admin to get the amount of bytes received from cellular network connection.
3780  *
3781  * @code{.c}
3782  long long bytes;
3783  mdm_result_t ret = mdm_msim_get_bytes_received_network("SIM1", &bytes);
3784  if (ret == MDM_RESULT_SUCCESS) {
3785  //Success
3786  }
3787 
3788  * @endcode
3789  *
3790  * @param[in] id SIM card id. Check mdm_msim_get_sim_ids() for available SIM card ids.
3791  * @param[out] bytes The amount of bytes received from network connection.
3792  *
3793  * @return #mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
3794  *
3795  * @retval #MDM_RESULT_SUCCESS Successful
3796  * @retval #MDM_RESULT_FAIL General failure
3797  * @retval #MDM_RESULT_NOT_SUPPORTED Not supported
3798  * @retval #MDM_RESULT_INVALID_PARAM Invalid parameter
3799  * @retval #MDM_RESULT_ACCESS_DENIED The application does not have the privilege to call this function.
3800  *
3801  * @see mdm_msim_enable_data_call_statistics, mdm_msim_is_data_call_statistics_enabled,
3802  * mdm_msim_get_bytes_sent_network
3803  *
3804  */
3805 mdm_result_t mdm_msim_get_bytes_received_network(const char *id, long long *bytes);
3806 
3861 
3917 
4002 mdm_data_t *mdm_history_get_next(mdm_history_context_t *ctx, unsigned long window_size);
4003 
4060 
4133 
4196 mdm_result_t mdm_history_add_sort_parameter(mdm_history_context_t *ctx, mdm_history_parameter_t parameter,
4197  mdm_sort_order_t order);
4198 
4236 mdm_result_t mdm_history_set_purge_interval(uint64_t interval);
4237 
4245 typedef struct mdm_history_purge_status_s {
4249  uint64_t interval;
4250 
4255 
4260 
4265 
4270 
4276 
4299 
4300 #endif /* MDM_FOR_SOLIS_PROF */
4301 
4306 #ifdef __cplusplus
4307 }
4308 #endif
4309 
4310 #endif // LIBMDM_MDM_DEVICE_INVENTORY_H
mdm_history_parameter_t
Defines type of parameter used by mdm_history_add_parameter() and mdm_history_add_sort_parameter().
mdm_result_t mdm_get_bytes_sent_network(long long *bytes)
API to retrieve the amount of bytes sent through network connection.
mdm_result_t mdm_history_add_parameter(mdm_history_context_t *ctx, const mdm_history_query_t *query_parameter)
Allows to define query parameters to limit amount of data returned by mdm_history_get_next() or remov...
mdm_history_event_type_t
Defines type of history event.
mdm_data_t * mdm_get_device_platform(void)
API to get the platform of the device.
mdm_result_t mdm_get_bytes_sent_wifi(long long *bytes)
API to retrieve the amount of bytes sent through Wi-Fi connection.
mdm_result_t mdm_enable_call_capture(mdm_status_t status)
API to enable or disable capture of calling information on device.
History info. This structure describes event which happened in the past.
mdm_direction_t direction
mdm_result_t mdm_history_set_purge_interval(uint64_t interval)
Enables automatic removal of events older than specified time.
const char * destination_number
mdm_result_t mdm_history_context_free(mdm_history_context_t *ctx)
Frees history context.
uint64_t record_id
Internal record id.
mdm_history_event_type_t type
This structure is used to store GList.
mdm_direction_t direction
Event direction.
mdm_data_t * mdm_get_outbound_sms_captured(void)
API to retrieve the Out-bound SMSs captured on device.
const char * number
Remote number.
mdm_data_t * mdm_get_network_operator_name(void)
API to get the alphanumeric name of current registered network operator.
mdm_result_t mdm_get_missed_calls_count(int *count)
API to retrieve the number of missed calls on the device.
mdm_sim_status_t
SIM card status.
mdm_result_t mdm_reset_calls_count(void)
API to reset the counters related to calls count.
mdm_result_t mdm_get_available_ram_memory(int *memory)
API to get the value of available RAM.
time_t timestamp
Event timestamp.
int duration
Duration of call.
mdm_result_t mdm_get_blocked_calls_count(int *count)
API to retrieve the number of blocked calls on the device for a specific SIM card.
mdm_result_t mdm_clear_sms_captured(void)
API to clear the SMS logged on device.
mdm_data_t * mdm_get_sim_operator(void)
API to get the numeric name (MCC+MNC) of the SIM operator.
mdm_result_t mdm_get_bytes_received_wifi(long long *bytes)
API to retrieve the amount of bytes received from Wi-Fi connection.
mdm_status_t mdm_is_device_locked(void)
Checks if device is currently locked.
const char * imei
IMEI.
mdm_data_t * mdm_get_device_maker(void)
API to get the OEM of device.
mdm_status_t
MDM Policy status.
mdm_sim_status_t mdm_get_sim_state(void)
API to the status of the device SIM card.
const char * call_type
Textual description of call.
Status of automatic history purges.
const char * imsi
IMSI.
mdm_status_t mdm_is_call_capture_enabled(void)
API to check whether call logging is enabled or disabled on device.
mdm_data_t * mdm_get_total_capacity_internal(void)
API to get the total capacity in bytes of the internal SD card and phone memory.
const char * iccid
SIM Card ICCID.
mdm_data_t * mdm_get_bluetooth_address(void)
API to check the hardware address of the local Bluetooth adapter.
mdm_data_t * mdm_get_available_capacity_external(void)
API to get the available capacity of the external SD card in bytes.
struct mdm_history_context_s mdm_history_context_t
Context used by extended call/SMS history APIs to handle requests.
mdm_result_t mdm_get_total_ram_memory(int *memory)
API to get total RAM memory on the device.
mdm_data_t * mdm_get_sim_serial_number(void)
API to get the ICCID of the SIM card in the device.
const char * sim_msisdn
SIM Card MSISDN.
mdm_status_t mdm_get_bluetooth_mode_status(void)
API to get the current state of the local Bluetooth adapter.
mdm_data_t * mdm_get_inbound_sms_captured(void)
API to retrieve the In-bound SMSs captured on device.
mdm_status_t mdm_is_bluetooth_supported(void)
API to check if Bluetooth capability is supported on the device or not.
mdm_status_t mdm_is_wifi_statistics_enabled(void)
API to determine if Wi-Fi statistics logging is enabled or disabled.
mdm_data_t * mdm_history_get_next(mdm_history_context_t *ctx, unsigned long window_size)
Gets the history records according to parameters specified in the history context.
mdm_data_t * mdm_get_subscriber_number(void)
API to get phone number associated with the device.
mdm_data_t * mdm_get_sim_country_iso(void)
API to get the standardized (ISO) country code of the SIM provider.
mdm_roaming_status_t roaming_status
mdm_result_t mdm_enable_wifi_statistics(mdm_status_t status)
API used to enable logging of Wi-Fi network statistics on the device.
mdm_result_t mdm_get_bytes_received_network(long long *bytes)
API to retrieve the amount of bytes received from network connection.
const char * body
Body of SMS.
mdm_roaming_status_t roaming_state
Roaming state.
mdm_result_t mdm_history_add_sort_parameter(mdm_history_context_t *ctx, mdm_history_parameter_t parameter, mdm_sort_order_t order)
Defines order of returned by mdm_history_get_next() data.
mdm_result_t mdm_enable_sms_capture(mdm_status_t status)
API to enable or disable SMS capture on device.
mdm_data_t * mdm_get_device_id(void)
API to get the unique device ID, for example, the IMEI for GSM and the MEID or ESN for CDMA phones...
mdm_result_t mdm_history_remove(mdm_history_context_t *ctx)
Removes records form internal call/SMS database.
mdm_data_t * mdm_get_network_operator(void)
API to get the numeric name (MCC+MNC) of the current registered network operator. ...
mdm_result_t mdm_get_success_calls_count(int *count)
Definition of a parameter used by mdm_history_add_parameter().
mdm_result_t
MDM API result.
mdm_data_t * mdm_get_modem_firmware(void)
API to get the model firmware version of the device.
mdm_data_t * mdm_get_device_serial_number(void)
API to get the device&#39;s serial number.
mdm_data_t * mdm_get_model_name(void)
API to get the model name of the device.
mdm_data_t * mdm_get_incoming_call_captured(void)
API to retrieve incoming call information captured on device.
mdm_status_t mdm_is_sms_capture_enabled(void)
API to check whether SMS capture is enabled or disabled on device.
mdm_data_t * mdm_get_available_capacity_internal(void)
API to get the available capacity of the internal phone memory in bytes.
mdm_data_t * mdm_get_sim_operator_name(void)
API to get the Service Provider Name (SPN) if SIM is available on the device.
mdm_status_t mdm_is_data_call_statistics_enabled(void)
API to determine whether cellular data network statistics logging is enabled.
mdm_result_t mdm_enable_data_call_statistics(mdm_status_t status)
API used to enable logging of cellular data network statistics on the device.
mdm_data_t * mdm_get_total_capacity_external(void)
API to get the total capacity in bytes of the external SD card.
mdm_sort_order_t
Enum type to specify the sort order of the result from the extended calls/SMSes history APIs...
mdm_data_t * mdm_history_get_purge_status(void)
This API returns automatic purge status.
mdm_roaming_status_t
Defines roaming status.
mdm_data_t * mdm_get_wifi_mac_address(void)
API to get the Wi-Fi MAC address of the device.
mdm_result_t mdm_clear_call_captured(void)
API to clear call information logged on device.
mdm_result_t mdm_reset_data_usage(void)
API to reset the counters for received and sent data including the carrier network and WiFi data usag...
mdm_history_parameter_t parameter
mdm_data_t * mdm_get_outgoing_call_captured(void)
API to retrieve outgoing call information captured on device.
mdm_status_t mdm_is_device_secure(void)
API to get the device status(secure or not)
mdm_network_service_type_t
network status
mdm_history_event_type_t type
mdm_data_t * mdm_get_platform_version(void)
API to get the Platform Version of the device.
mdm_data_t * mdm_get_device_name(void)
API to get the name of device.
const char * slot_id
SIM slot id.
mdm_data_t * mdm_get_device_processor_type(void)
API to get the processor type of the device.
mdm_history_context_t * mdm_history_context_new(void)
Creates new history context.
mdm_result_t mdm_get_rejected_calls_count(int *count)
API to retrieve the number of rejected calls on the device.
mdm_network_service_type_t mdm_get_network_type(void)
API to get the radio technology (Network Type) that is currently being used on the device...
mdm_direction_t
Defines direction of call and SMS events.