Phone Restriction policy group provides policies for phone setting control.
More...
|
mdm_status_t | mdm_get_emergency_call_only_enabled (void) |
| API to check if only emergency calls are allowed on device. More...
|
|
mdm_status_t | mdm_get_data_call_limit_enabled (void) |
| API to check whether data carrier network usage limit is enabled or not. More...
|
|
mdm_status_t | mdm_get_limit_number_of_calls_enabled (void) |
| API to check if number of calls are limited. More...
|
|
mdm_status_t | mdm_get_limit_number_of_sms_enabled (void) |
| API to check if number of SMSs are limited. More...
|
|
mdm_data_t * | mdm_get_incoming_call_restriction (int n_all_admin) |
| API to get the restriction pattern for incoming calls. More...
|
|
mdm_data_t * | mdm_get_incoming_sms_restriction (int n_all_admin) |
| API to get the restriction pattern for incoming SMS. More...
|
|
mdm_data_t * | mdm_get_outgoing_call_restriction (int n_all_admin) |
| API to get the restriction pattern for outgoing calls. More...
|
|
mdm_data_t * | mdm_get_outgoing_sms_restriction (int n_all_admin) |
| API to get the restriction pattern for outgoing SMS. More...
|
|
mdm_result_t | mdm_get_limit_of_data_calls (time_t *p_date_set, time_t *p_period, size_t *p_send_limit, size_t *p_recv_limit) |
| API to get the limits of sent and received data for mobile carriers. More...
|
|
mdm_result_t | mdm_get_limit_of_incoming_calls (mdm_call_limit_t type, unsigned int *p_value) |
| API to get the limit of incoming calls for day, week or month. More...
|
|
mdm_result_t | mdm_get_limit_of_incoming_sms (mdm_sms_limit_t type, unsigned int *p_value) |
| API to get the limit of incoming SMSs for day, week or month. More...
|
|
mdm_result_t | mdm_get_limit_of_outgoing_calls (mdm_call_limit_t type, unsigned int *p_value) |
| API to get the limit of outgoing calls for day, week or month. More...
|
|
mdm_result_t | mdm_get_limit_of_outgoing_sms (mdm_sms_limit_t type, unsigned int *p_value) |
| API to get the limit of outgoing SMSs for day, week or month. More...
|
|
mdm_result_t | mdm_enable_limit_number_of_calls (mdm_status_t status) |
| API to enable or disable limit of number of calls. More...
|
|
mdm_result_t | mdm_enable_limit_number_of_sms (mdm_status_t status) |
| API to enable or disable limit of number of SMSs. More...
|
|
mdm_result_t | mdm_enable_data_call_limit (mdm_status_t status) |
| API to enable limit of data packet on the device. More...
|
|
mdm_result_t | mdm_enable_emergency_call_only (mdm_status_t status) |
| API to enable or disable emergency calls only on device. More...
|
|
mdm_result_t | mdm_add_incoming_call_restriction (char *p_pattern) |
| API to add a restriction pattern to the admin restriction pattern set for incoming calls. More...
|
|
mdm_result_t | mdm_add_incoming_sms_restriction (char *p_pattern) |
| API to add a restriction pattern to the admin restriction pattern set for incoming SMSs. More...
|
|
mdm_result_t | mdm_add_outgoing_call_restriction (char *p_pattern) |
| API to add a restriction pattern to the admin restriction pattern set for outgoing calls. More...
|
|
mdm_result_t | mdm_add_outgoing_sms_restriction (char *p_pattern) |
| API to add a restriction pattern to the admin restriction pattern set for outgoing SMSs. More...
|
|
mdm_result_t | mdm_remove_incoming_call_restriction (void) |
| API to remove the restriction pattern for incoming calls set by the calling admin. More...
|
|
mdm_result_t | mdm_remove_incoming_sms_restriction (void) |
| API to remove the restriction pattern for incoming SMSs set by the calling admin. More...
|
|
mdm_result_t | mdm_remove_outgoing_call_restriction (void) |
| API to remove the restriction pattern for outgoing calls set by the calling admin. More...
|
|
mdm_result_t | mdm_remove_outgoing_sms_restriction (void) |
| API to remove the restriction pattern for outgoing SMSs set by the calling admin. More...
|
|
mdm_result_t | mdm_reset_call_limit_count (void) |
| API to reset the counters for incoming and outgoing calls. More...
|
|
mdm_result_t | mdm_reset_data_call_limit_count (void) |
| API to reset the counters of amount of data packet sent and received on device. More...
|
|
mdm_result_t | mdm_reset_sms_limit_count (void) |
| API to reset the counters for incoming or outgoing SMSs. More...
|
|
mdm_result_t | mdm_set_incoming_call_restriction (char *p_pattern) |
| API to set a restriction pattern to be matched by incoming call numbers. More...
|
|
mdm_result_t | mdm_set_incoming_sms_restriction (char *p_pattern) |
| API to set a restriction pattern to be matched by incoming SMSs numbers. More...
|
|
mdm_result_t | mdm_set_limit_of_data_calls (time_t period, size_t sent_limit, size_t recv_limit) |
| API to set the combined limit of data packet for given period. More...
|
|
mdm_result_t | mdm_set_limit_of_incoming_calls (unsigned int limitbyday, unsigned int limitbyweek, unsigned int limitbymonth) |
| API to set the limit of number of incoming calls per day, week and month. More...
|
|
mdm_result_t | mdm_set_limit_of_incoming_sms (unsigned int limitbyday, unsigned int limitbyweek, unsigned int limitbymonth) |
| API to set the limit of number of incoming SMSs per day, week and month. More...
|
|
mdm_result_t | mdm_set_limit_of_outgoing_calls (unsigned int limitbyday, unsigned int limitbyweek, unsigned int limitbymonth) |
| API to set the limit of number of outgoing calls per day, week and month. More...
|
|
mdm_result_t | mdm_set_limit_of_outgoing_sms (unsigned int limitbyday, unsigned int limitbyweek, unsigned int limitbymonth) |
| API to set the limit of number of outgoing SMSs per day, week and month. More...
|
|
mdm_result_t | mdm_set_outgoing_call_restriction (char *p_pattern) |
| API to set a restriction pattern to be matched by outgoing call numbers. More...
|
|
mdm_result_t | mdm_set_outgoing_sms_restriction (char *p_pattern) |
| API to set a restriction pattern to be matched by outgoing sms numbers. More...
|
|
mdm_result_t | knox_mdm_allowed_incoming_calls_add (const char *sim_id, const char *pattern) |
| API to add an allowed pattern for incoming calls. More...
|
|
mdm_result_t | knox_mdm_allowed_incoming_calls_remove (const char *sim_id) |
| API to remove all allowed patterns of incoming calls set by the calling admin. More...
|
|
mdm_data_t * | knox_mdm_allowed_incoming_calls_get (const char *sim_id, bool all_admins) |
| API to get the list of allowed patterns for incoming calls. More...
|
|
Phone Restriction policy group provides policies for phone setting control.
Phone Restriction policy group.
Required Header
#include <mdm.h>
Overview
This group provides APIs to control the various settings related to telephony functionality.
Pattern matching considerations
It is important to note that APIs that receive a regex pattern as an argument must be aligned to the ‘posix-extended’ regular expression syntax.
Examples of some valid expressions are as follows:
.* matches ALL phone numbers.
011.* matches all phone numbers started with 011 (international code) E.g. numbers NOT matched: 8001234567, 8005557890, 18001234567, 800-123-4567, 1-800-1234-567, 800123456, 80012345678, 5551234567, 8015557890; numbers matched: 011551912345678
(900[0-9]{7}$).* matches phone numbers started with 900 followed by exactly seven digits. E.g. numbers matched: 9001234567, 9005557890
(900[-]?[0-9]{3}[-]?[0-9]{4}$).* same as above, plus optional dashes. E.g. numbers matched: 9001234567, 900-555-7890, 900-9001234, 900123-4567
NOTE: The backslash before hyphen indicates to treat the hyphen as literal, not as regex symbol.
(?!800[0-9]{7}$).* matches all numbers EXCEPT numbers started with 800 followed by exactly seven digits. E.g. numbers NOT matched: 8001234567, 8005557890; numbers matched: 800123456, 80012345678, 800-123-4567, 18001234567, 1-800-1234-567, 5551234567, 8015557890, 011551912345678
(?![1]?800[0-9]{7}$).* matches all numbers EXCEPT numbers started with [optional "1" digit]800 followed by exactly seven digits. E.g. numbers NOT matched: 8001234567, 8005557890, 18001234567; numbers matched: 800123456, 80012345678, 800-123-4567, 1-800-1234-567, 5551234567, 8015557890, 011551912345678
NOTE: The international code may be sent by cellular carrier or not. Some of the possibilities: 1[number], 1-[number], +1[number], +1-[number].
(?![1]?[-]?800[-]?[0-9]{3}[-]?[0-9]{4}$).* same as above, plus optional dashes E.g. numbers NOT matched: 8001234567, 8005557890, 18001234567, 800-123-4567, 1-800-1234-567; numbers matched: 800123456, 80012345678, 5551234567, 8015557890, 011551912345678
The the number of call limit by day/week/month.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.3.1.5
- See also
Enumerator |
---|
MDM_LIMIT_NUMBER_OF_CALLS_BY_DAY |
Flag to be used to retrieve the number of incoming or outgoing calls allowed by day.
|
MDM_LIMIT_NUMBER_OF_CALLS_BY_WEEK |
Flag to be used to retrieve the number of incoming or outgoing calls allowed by week.
|
MDM_LIMIT_NUMBER_OF_CALLS_BY_MONTH |
Flag to be used to retrieve the number of incoming or outgoing calls allowed by month.
|
Definition at line 42 of file phone_restriction.h.
The the call types for operations.
- Since (Knox_wearable):
- 1.1.0
- Since (Tizen):
- 2.3.2.3
- See also
Enumerator |
---|
MDM_CALL_TYPE_SMS |
Enum to search in sms restriction
|
MDM_CALL_TYPE_CALL |
Enum to search in call restriction
|
MDM_CALL_TYPE_DATA_CALL |
Enum to search in data call restriction
|
Definition at line 72 of file phone_restriction.h.
The the number of sms limit by day/week/month.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.3.1.5
- See also
Enumerator |
---|
MDM_LIMIT_NUMBER_OF_SMS_BY_DAY |
Flag to be used to retrieve the number of sent or received sms allowed by day.
|
MDM_LIMIT_NUMBER_OF_SMS_BY_WEEK |
Flag to be used to retrieve the number of sent or received sms allowed by week.
|
MDM_LIMIT_NUMBER_OF_SMS_BY_MONTH |
Flag to be used to retrieve the number of sent or received sms allowed by month.
|
Definition at line 57 of file phone_restriction.h.
mdm_result_t knox_mdm_allowed_incoming_calls_add |
( |
const char * |
sim_id, |
|
|
const char * |
pattern |
|
) |
| |
API to add an allowed pattern for incoming calls.
- Since (Knox_wearable):
- 2.4.0
- Since (Tizen):
- 4.0.0.6
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- This API adds (concatenates) the provided allowed pattern to the allowed pattern set for incoming calls.
- Privilege Level:
- public
- Privilege:
- http://developer.samsung.com/tizen/privilege/mdm.phonerestriction
- Parameters
-
[in] | sim_id | SIM card id |
[in] | pattern | The allowed pattern to be matched against the incoming call number |
- Returns
- MDM_RESULT_SUCCESS on success, an error code on error
- Return values
-
- See also
- knox_mdm_allowed_incoming_calls_remove
mdm_data_t* knox_mdm_allowed_incoming_calls_get |
( |
const char * |
sim_id, |
|
|
bool |
all_admins |
|
) |
| |
API to get the list of allowed patterns for incoming calls.
- Since (Knox_wearable):
- 2.4.0
- Since (Tizen):
- 4.0.0.6
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- Admin can use this API to retrieve the current patterns being used to allowed in incoming calls.
if (lp_data) {
printf(
"data : %s", (
char *)lp_data->
data);
}
- Parameters
-
[in] | sim_id | SIM card id |
[in] | all_admins | True to get a composition of all allowed pattern from all admins, false to get allowed pattern from the calling admin |
- Returns
- mdm_data_t: A list of allowed patterns for incoming call and a return error code
- Return values
-
- See also
- knox_mdm_allowed_incoming_calls_add
-
knox_mdm_allowed_incoming_calls_remove
mdm_result_t knox_mdm_allowed_incoming_calls_remove |
( |
const char * |
sim_id | ) |
|
API to remove all allowed patterns of incoming calls set by the calling admin.
- Since (Knox_wearable):
- 2.4.0
- Since (Tizen):
- 4.0.0.6
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- This method removes the pattern set by the caller admin for allowed incoming calls
- Privilege Level:
- public
- Privilege:
- http://developer.samsung.com/tizen/privilege/mdm.phonerestriction
- Parameters
-
- Returns
- MDM_RESULT_SUCCESS on success, an error code on error
- Return values
-
- See also
- knox_mdm_allowed_incoming_calls_add
mdm_result_t mdm_add_incoming_call_restriction |
( |
char * |
p_pattern | ) |
|
API to add a restriction pattern to the admin restriction pattern set for incoming calls.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.3.2.3
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- This API adds (concatenates) the provided restriction pattern to the restriction pattern set of the admin for incoming calls.
- Privilege Level:
- public
- Privilege:
- http://developer.samsung.com/tizen/privilege/mdm.phonerestriction
- Parameters
-
[in] | p_pattern | The restriction pattern to be matched against the incoming call number |
- Returns
- mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
- Return values
-
- Permission:
- Usage of this API is restricted to registered clients only.
- See also
- mdm_remove_incoming_call_restriction
mdm_result_t mdm_add_incoming_sms_restriction |
( |
char * |
p_pattern | ) |
|
API to add a restriction pattern to the admin restriction pattern set for incoming SMSs.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.3.2.3
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- This API adds (concatenates) the provided restriction pattern to the restriction pattern set of the admin for incoming SMSs.
- Privilege Level:
- public
- Privilege:
- http://developer.samsung.com/tizen/privilege/mdm.phonerestriction
- Parameters
-
[in] | p_pattern | The restriction pattern to be matched against the incoming sms number |
- Returns
- mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
- Return values
-
- Permission:
- Usage of this API is restricted to registered clients only.
- See also
- mdm_remove_incoming_sms_restriction
mdm_result_t mdm_add_outgoing_call_restriction |
( |
char * |
p_pattern | ) |
|
API to add a restriction pattern to the admin restriction pattern set for outgoing calls.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.3.2.3
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- This API adds (concatenates) the provided restriction pattern to the restriction pattern set of the admin for outgoing calls.
- Privilege Level:
- public
- Privilege:
- http://developer.samsung.com/tizen/privilege/mdm.phonerestriction
- Parameters
-
[in] | p_pattern | The restriction pattern to be matched against the outgoing call number |
- Returns
- mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
- Return values
-
- Permission:
- Usage of this API is restricted to registered clients only.
- See also
- mdm_remove_outgoing_call_restriction
mdm_result_t mdm_add_outgoing_sms_restriction |
( |
char * |
p_pattern | ) |
|
API to add a restriction pattern to the admin restriction pattern set for outgoing SMSs.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.3.2.3
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- This API adds (concatenates) the provided restriction pattern to the restriction pattern set of the admin for outgoing SMSs.
- Privilege Level:
- public
- Privilege:
- http://developer.samsung.com/tizen/privilege/mdm.phonerestriction
- Parameters
-
[in] | p_pattern | The restriction pattern to be matched against the outgoing sms number |
- Returns
- mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
- Return values
-
- Permission:
- Usage of this API is restricted to registered clients only.
- See also
- mdm_remove_outgoing_sms_restriction
API to enable limit of data packet on the device.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.3.2.3
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- Using this API admin client can enable the limit on data packet traffic. The default value for this policy is MDM_DISABLED (it is disabled by default).
- Note
- To enforce a limit one must call mdm_set_limit_of_data_calls().
} else {
time_t WEEK = (time_t)7*24*60*60
}
}
- Privilege Level:
- public
- Privilege:
- http://developer.samsung.com/tizen/privilege/mdm.phonerestriction
- Parameters
-
[in] | status | MDM_ENABLED if the device shall limit the data call statistics (count amount of data) No limit will be set unless mdm_set_limit_of_data_calls() is called after this function. When MDM_DISABLED is passed, all limits set are removed. |
- Returns
- mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
- Return values
-
- Permission:
- Usage of this API is restricted to registered clients only.
- See also
- mdm_set_limit_of_data_calls
-
mdm_get_data_call_limit_enabled
API to enable or disable emergency calls only on device.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.3.2.3
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- If enabled, only emergency will be allowed on device. All other calls will be blocked.
- Privilege Level:
- public
- Privilege:
- http://developer.samsung.com/tizen/privilege/mdm.phonerestriction
- Parameters
-
[in] | status | Only emergency calls |
- Returns
- mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
- Return values
-
- Permission:
- Usage of this API is restricted to registered clients only.
- See also
- mdm_get_emergency_call_only_enabled
API to enable or disable limit of number of calls.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.3.2.3
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- Admin can use this policy to enable or disable the limit of number of calls allowed on the device. This policy is complemented by: mdm_set_limit_of_incoming_calls() and mdm_set_limit_of_outgoing_calls().
- Privilege Level:
- public
- Privilege:
- http://developer.samsung.com/tizen/privilege/mdm.phonerestriction
- Parameters
-
[in] | status | True to enable limit number of calls , false to disable limit number of calls. |
- Returns
- mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
- Return values
-
- Permission:
- Usage of this API is restricted to registered clients only.
- See also
- mdm_set_limit_of_incoming_calls
-
mdm_set_limit_of_outgoing_calls
API to enable or disable limit of number of SMSs.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.3.2.3
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- Admin can use this policy to enable or disable the limit of number of calls allowed on the device. This policy is complemented by: mdm_set_limit_of_incoming_sms(int, int, int) and mdm_set_limit_of_outgoing_sms(int, int, int).
- Privilege Level:
- public
- Privilege:
- http://developer.samsung.com/tizen/privilege/mdm.phonerestriction
- Parameters
-
[in] | status | True to enable limit number of SMSs, false to disable limit number of SMSs. |
- Returns
- mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
- Return values
-
- Permission:
- Usage of this API is restricted to registered clients only.
- See also
- mdm_get_limit_number_of_sms_enabled
API to check whether data carrier network usage limit is enabled or not.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.3.1.5
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- Applications, services and admin client can use this interface to verify if data call limiting policy is enabled on the device.
- Note
- If the limit of data has been enabled by admin client no other application shall allow alerting this limit.
_set_enabled(submenu_data_call_limit, FALSE);
} else {
submenu.
_set_enabled(submenu_data_call_limit, TRUE);
}
} else {
}
- Returns
- mdm_status_t : Current mode of operation, one of MDM_ENABLED or MDM_DISABLED
- See also
- mdm_enable_data_call_limit
-
mdm_get_limit_of_data_calls
API to check if only emergency calls are allowed on device.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.3.1.5
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- Admin can check if the emergency call is enabled on the device. If enabled, only emergency will be allowed. All other calls will be blocked.
- Returns
- mdm_status_t : Current mode of operation
- Return values
-
- See also
- mdm_enable_emergency_call_only
mdm_data_t* mdm_get_incoming_call_restriction |
( |
int |
n_all_admin | ) |
|
API to get the restriction pattern for incoming calls.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.3.1.5
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- Admin can use this API to retrieve the current pattern being used to restrict incoming calls.
if (lp_data) {
printf(
"data : %s", (
char *)lp_data->
data);
}
- Parameters
-
[in] | n_all_admin | True to get a composition of all restrictions from all admins, false to get a restriction pattern from the calling admin |
- Returns
- mdm_status_t : Current mode of operation, one of MDM_ALLOWED or MDM_RESTRICTED
- See also
- mdm_set_incoming_call_restriction
mdm_data_t* mdm_get_incoming_sms_restriction |
( |
int |
n_all_admin | ) |
|
API to get the restriction pattern for incoming SMS.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.3.1.5
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- Admin can use this API to retrieve the current pattern being used to restrict incoming SMS.
if (lp_data) {
printf(
"data : %s", (
char *)lp_data->
data);
}
- Parameters
-
[in] | n_all_admin | True to get a composition of all restrictions from all admins, false to get a restriction pattern from the calling admin |
- Returns
- mdm_data_t * on success, NULL on error
- See also
- mdm_set_incoming_sms_restriction
API to check if number of calls are limited.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.3.1.5
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- Admin can use this method to verify if there is a limitation on the number of calls on device
- Returns
- mdm_status_t : Current mode of operation, one of MDM_ALLOWED or MDM_RESTRICTED
- See also
- mdm_enable_limit_number_of_calls
API to check if number of SMSs are limited.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.3.1.5
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- Admin can use this method to verify if there is a limitation on the number of SMSs on device
- Returns
- mdm_status_t : Current mode of operation, one of MDM_ALLOWED or MDM_RESTRICTED
- See also
- mdm_enable_limit_number_of_sms
mdm_result_t mdm_get_limit_of_data_calls |
( |
time_t * |
p_date_set, |
|
|
time_t * |
p_period, |
|
|
size_t * |
p_send_limit, |
|
|
size_t * |
p_recv_limit |
|
) |
| |
API to get the limits of sent and received data for mobile carriers.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.3.1.5
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- The API can be used by admin clients to get information about the limit of received and sent data, date the limit was set and the period of time when the limit was set.
- Note
- If limit is disabled, the result of this call will fail - check with mdm_get_data_call_limit_enabled().
-
The API returns only limits set by mdm_set_limit_of_data_calls(). It doesn't return how many bytes left.
time_t date_set, period;
time_t send_limit, recv_limit;
} else {
}
} else {
}
- Parameters
-
[in,out] | p_date_set | Date when limit has been set. |
[in,out] | p_period | Period for which data call limit has been set. |
[in,out] | p_send_limit | Amount of data device can send in given period in megabytes. |
[in,out] | p_recv_limit | Amount of data device can receive in given period in megabytes. |
- Returns
- mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
- Return values
-
- See also
- mdm_set_limit_of_data_calls
-
mdm_get_data_call_limit_enabled
API to get the limit of incoming calls for day, week or month.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.3.1.5
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- This method returns the restricted limit of number of incoming calls based on the parameter passed to it
int value = 0;
printf("%d", value);
}
- Parameters
-
- Returns
- mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
- Return values
-
- See also
- mdm_set_limit_of_incoming_calls
API to get the limit of incoming SMSs for day, week or month.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.3.1.5
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- This method returns the restricted limit of number of incoming SMSs based on the parameter passed to it
int value = 0;
printf("%d", value);
}
- Parameters
-
- Returns
- mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
- Return values
-
- See also
- mdm_set_limit_of_incoming_sms
API to get the limit of outgoing calls for day, week or month.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.3.1.5
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- This method returns the restricted limit of number of outgoing calls based on the parameter passed to it
int value = 0;
printf("%d", value);
}
- Parameters
-
- Returns
- mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
- Return values
-
- See also
- mdm_set_limit_of_outgoing_calls
API to get the limit of outgoing SMSs for day, week or month.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.3.1.5
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- This method returns the restricted limit of number of outgoing SMSs based on the parameter passed to it
int value = 0;
printf("%d", value);
}
- Parameters
-
- Returns
- mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
- Return values
-
- See also
- mdm_set_limit_of_outgoing_sms
mdm_data_t* mdm_get_outgoing_call_restriction |
( |
int |
n_all_admin | ) |
|
API to get the restriction pattern for outgoing calls.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.3.1.5
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- Admin can use this API to retrieve the current pattern being used to restrict outgoing calls.
if (lp_data) {
printf(
"data : %s", (
char *)lp_data->
data);
}
- Parameters
-
[in] | n_all_admin | True to get a composition of all restrictions from all admins, false to get a restriction pattern from the calling admin |
- Returns
- mdm_data_t * on success, NULL on error
- See also
- mdm_set_outgoing_call_restriction
mdm_data_t* mdm_get_outgoing_sms_restriction |
( |
int |
n_all_admin | ) |
|
API to get the restriction pattern for outgoing SMS.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.3.1.5
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- Admin can use this API to retrieve the current pattern being used to restrict outgoing SMS.
if (lp_data) {
printf(
"data : %s", (
char *)lp_data->
data);
}
- Parameters
-
[in] | n_all_admin | True to get a composition of all restrictions from all admins, false to get a restriction pattern from the calling admin. |
- Returns
- mdm_data_t * on success, NULL on error
- See also
- mdm_set_outgoing_sms_restriction
API to remove the restriction pattern for incoming calls set by the calling admin.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.3.2.3
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- This method removes the pattern set by the caller admin for incoming calls restriction
- Privilege Level:
- public
- Privilege:
- http://developer.samsung.com/tizen/privilege/mdm.phonerestriction
- Returns
- mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
- Return values
-
- Permission:
- Usage of this API is restricted to registered clients only.
- See also
- mdm_add_incoming_call_restriction
API to remove the restriction pattern for incoming SMSs set by the calling admin.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.3.2.3
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- This method removes the pattern set by the caller admin for incoming SMS restriction
- Privilege Level:
- public
- Privilege:
- http://developer.samsung.com/tizen/privilege/mdm.phonerestriction
- Returns
- mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
- Return values
-
- Permission:
- Usage of this API is restricted to registered clients only.
- See also
- mdm_add_incoming_sms_restriction
API to remove the restriction pattern for outgoing calls set by the calling admin.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.3.2.3
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- This method removes the pattern set by the caller admin for outgoing calls restriction
- Privilege Level:
- public
- Privilege:
- http://developer.samsung.com/tizen/privilege/mdm.phonerestriction
- Returns
- mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
- Return values
-
- Permission:
- Usage of this API is restricted to registered clients only.
- See also
- mdm_add_outgoing_call_restriction
API to remove the restriction pattern for outgoing SMSs set by the calling admin.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.3.2.3
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- This method removes the pattern set by the caller admin for outgoing SMSs restriction
- Privilege Level:
- public
- Privilege:
- http://developer.samsung.com/tizen/privilege/mdm.phonerestriction
- Returns
- mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
- Return values
-
- Permission:
- Usage of this API is restricted to registered clients only.
- See also
- mdm_add_outgoing_sms_restriction
API to reset the counters for incoming and outgoing calls.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.3.2.3
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- This method resets all the counters for incoming and outgoing calls for each date type (day, week and month). The limits set for each kind of call will not be changed.
- Privilege Level:
- public
- Privilege:
- http://developer.samsung.com/tizen/privilege/mdm.phonerestriction
- Returns
- mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
- Return values
-
- Permission:
- Usage of this API is restricted to registered clients only.
- See also
API to reset the counters of amount of data packet sent and received on device.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.3.2.3
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- This method resets the counters for data usage limits for each date type (received and sent). The limits set for each data type won't be changed.
- Privilege Level:
- public
- Privilege:
- http://developer.samsung.com/tizen/privilege/mdm.phonerestriction
- Returns
- mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
- Return values
-
- See also
API to reset the counters for incoming or outgoing SMSs.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.3.2.3
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- This method resets all the counters for incoming or outgoing SMSs for each date type (day, week and month)
- Privilege Level:
- public
- Privilege:
- http://developer.samsung.com/tizen/privilege/mdm.phonerestriction
- Returns
- mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
- Return values
-
- Permission:
- Usage of this API is restricted to registered clients only.
- See also
mdm_result_t mdm_set_incoming_call_restriction |
( |
char * |
p_pattern | ) |
|
API to set a restriction pattern to be matched by incoming call numbers.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.3.2.3
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- This API overrides any pattern previously set by the admin for incoming calls.
- Privilege Level:
- public
- Privilege:
- http://developer.samsung.com/tizen/privilege/mdm.phonerestriction
- Parameters
-
[in] | p_pattern | The restriction pattern to be matched against the incoming call number |
- Returns
- mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
- Return values
-
- Permission:
- Usage of this API is restricted to registered clients only.
- See also
- mdm_get_incoming_call_restriction
mdm_result_t mdm_set_incoming_sms_restriction |
( |
char * |
p_pattern | ) |
|
API to set a restriction pattern to be matched by incoming SMSs numbers.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.3.2.3
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- This API overrides any pattern previously set by the admin for incoming SMSs.
- Privilege Level:
- public
- Privilege:
- http://developer.samsung.com/tizen/privilege/mdm.phonerestriction
- Parameters
-
[in] | p_pattern | The restriction pattern to be matched against the incoming sms number |
- Returns
- mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
- Return values
-
- Permission:
- Usage of this API is restricted to registered clients only.
- See also
- mdm_get_incoming_sms_restriction
mdm_result_t mdm_set_limit_of_data_calls |
( |
time_t |
period, |
|
|
size_t |
sent_limit, |
|
|
size_t |
recv_limit |
|
) |
| |
API to set the combined limit of data packet for given period.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.3.2.3
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- Admin client can use this interface to limit the amount of data sent and received through carriers network for given period of time. Counting of the time period starts at the moment of calling this function.
- Note
- - Before calling this function, data call limit has to be enbled with mdm_enable_data_call_limit. Otherwise this function will fail and no limit will be enforced.
- The total limit size set by this API is a combination of the sent_limit and recv_limit.
- It is only possible to set limits for daily, weekly and monthly periods in seconds.
- Passing period with different values than the specified before follows the rule below: Daily period will be set if period >= 0 or period <= 86400. Weekly period will be set if period > 86400 or period <= 604800. Montly period will be set if period > 604800.
} else {
time_t WEEK = (time_t)7*24*60*60
}
}
- Privilege Level:
- public
- Privilege:
- http://developer.samsung.com/tizen/privilege/mdm.phonerestriction
- Parameters
-
[in] | period | Time period in seconds. |
[in] | sent_limit | Limit in megabytes for sent data. |
[in] | recv_limit | Limit in megabytes for received data. |
- Returns
- mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
- Return values
-
- Permission:
- Usage of this API is restricted to registered clients only.
- See also
- mdm_enable_data_call_limit
-
mdm_get_data_call_limit_enabled
-
mdm_get_limit_of_data_calls
mdm_result_t mdm_set_limit_of_incoming_calls |
( |
unsigned int |
limitbyday, |
|
|
unsigned int |
limitbyweek, |
|
|
unsigned int |
limitbymonth |
|
) |
| |
API to set the limit of number of incoming calls per day, week and month.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.3.2.3
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- Admin can set a limit to the number of incoming calls by day, week or month. Passing "0" as a parameter means that there is no limit on the number of calls to what it is related (day, week or month).
- Privilege Level:
- public
- Privilege:
- http://developer.samsung.com/tizen/privilege/mdm.phonerestriction
- Parameters
-
[in] | limitbyday | The maximum number of bytes for a day. |
[in] | limitbyweek | The maximum number of bytes for a week. |
[in] | limitbymonth | The maximum number of bytes for a month. |
- Returns
- mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
- Return values
-
- Permission:
- Usage of this API is restricted to registered clients only.
- See also
- mdm_get_limit_of_incoming_calls
mdm_result_t mdm_set_limit_of_incoming_sms |
( |
unsigned int |
limitbyday, |
|
|
unsigned int |
limitbyweek, |
|
|
unsigned int |
limitbymonth |
|
) |
| |
API to set the limit of number of incoming SMSs per day, week and month.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.3.2.3
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- Admin can set a limit to the number of incoming SMSs by day, week or month. Passing "0" as a parameter means that there is no limit on the number of SMSs to what it is related (day, week or month).
- Privilege Level:
- public
- Privilege:
- http://developer.samsung.com/tizen/privilege/mdm.phonerestriction
- Parameters
-
[in] | limitbyday | The maximum number of bytes for a day. |
[in] | limitbyweek | The maximum number of bytes for a week. |
[in] | limitbymonth | The maximum number of bytes for a month. |
- Returns
- mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
- Return values
-
- Permission:
- Usage of this API is restricted to registered clients only.
- See also
- mdm_get_limit_of_incoming_sms
mdm_result_t mdm_set_limit_of_outgoing_calls |
( |
unsigned int |
limitbyday, |
|
|
unsigned int |
limitbyweek, |
|
|
unsigned int |
limitbymonth |
|
) |
| |
API to set the limit of number of outgoing calls per day, week and month.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.3.2.3
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- Admin can set a limit to the number of outgoing calls by day, week or month. Passing "0" as a parameter means that there is no limit on the number of calls to what it is related (day, week or month).
- Privilege Level:
- public
- Privilege:
- http://developer.samsung.com/tizen/privilege/mdm.phonerestriction
- Parameters
-
[in] | limitbyday | The maximum number of bytes for a day. |
[in] | limitbyweek | The maximum number of bytes for a week. |
[in] | limitbymonth | The maximum number of bytes for a month. |
- Returns
- mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
- Return values
-
- Permission:
- Usage of this API is restricted to registered clients only.
- See also
- mdm_get_limit_of_outgoing_calls
mdm_result_t mdm_set_limit_of_outgoing_sms |
( |
unsigned int |
limitbyday, |
|
|
unsigned int |
limitbyweek, |
|
|
unsigned int |
limitbymonth |
|
) |
| |
API to set the limit of number of outgoing SMSs per day, week and month.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.3.2.3
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- Admin can set a limit to the number of outgoing SMSs by day, week or month. Passing "0" as a parameter means that there is no limit on the number of SMSs to what it is related (day, week or month).
- Privilege Level:
- public
- Privilege:
- http://developer.samsung.com/tizen/privilege/mdm.phonerestriction
- Parameters
-
[in] | limitbyday | The maximum number of bytes for a day. |
[in] | limitbyweek | The maximum number of bytes for a week. |
[in] | limitbymonth | The maximum number of bytes for a month. |
- Returns
- mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
- Return values
-
- Permission:
- Usage of this API is restricted to registered clients only.
- See also
- mdm_get_limit_of_outgoing_sms
mdm_result_t mdm_set_outgoing_call_restriction |
( |
char * |
p_pattern | ) |
|
API to set a restriction pattern to be matched by outgoing call numbers.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.3.2.3
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- This API overrides any pattern previously set by the admin for outgoing calls.
- Privilege Level:
- public
- Privilege:
- http://developer.samsung.com/tizen/privilege/mdm.phonerestriction
- Parameters
-
[in] | p_pattern | The restriction pattern to be matched against the outgoing call number |
- Returns
- mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
- Return values
-
- Permission:
- Usage of this API is restricted to registered clients only.
- See also
- mdm_get_outgoing_call_restriction
mdm_result_t mdm_set_outgoing_sms_restriction |
( |
char * |
p_pattern | ) |
|
API to set a restriction pattern to be matched by outgoing sms numbers.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.3.2.3
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- This method overrides any previously set pattern in database or add a new one if none exist
- Privilege Level:
- public
- Privilege:
- http://developer.samsung.com/tizen/privilege/mdm.phonerestriction
- Parameters
-
[in] | p_pattern | The restriction pattern to be matched against the outgoing sms number |
- Returns
- mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
- Return values
-
- Permission:
- Usage of this API is restricted to registered clients only.
- See also
- mdm_get_outgoing_sms_restriction