3 * Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 * Licensed under the Apache License, Version 2.0 (the License);
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
23 #endif /* __cplusplus */
27 * @brief Provides definition of mdm status enum and various enum related to the password
30 /** @addtogroup device_manager
35 * Function which is called when status is changed
37 * @param[in] status mdm status
38 * @param[in] userdata user data
45 * @see dm_register_mdm_callback(int, sync_agent_dm_mdm_event_e, sync_agent_device_manager_cb, void*)
48 typedef int (*sync_agent_device_manager_cb) (int status, void *userdata);
51 * Enumerations of mdm status
54 sync_agent_dm_mdm_status_e_ERROR = -1,
56 SYNC_AGENT_DM_MDM_ALLOWED = 0,
57 SYNC_AGENT_DM_MDM_RESTRICTED = 1,
59 SYNC_AGENT_DM_MDM_ENABLED = 0,
60 SYNC_AGENT_DM_MDM_DISABLED = 1,
62 SYNC_AGENT_DM_MDM_FALSE = 0,
63 SYNC_AGENT_DM_MDM_TRUE = 1,
65 SYNC_AGENT_DM_MDM_BT_ALLOWED = 0, /**< */
66 SYNC_AGENT_DM_MDM_BT_RESTRICTED = 1,
67 SYNC_AGENT_DM_MDM_BT_HANDSFREE_ONLY = 2,
68 } sync_agent_dm_mdm_status_e;
71 * Enumerations of password quality
74 SYNC_AGENT_DM_MDM_PWD_QUALITY_UNSPECIFIED,
75 /**< No requirements for password. */
76 SYNC_AGENT_DM_MDM_PWD_QUALITY_SOMETHING, /**< Some kind password is required, but doesn't care what it is */
77 SYNC_AGENT_DM_MDM_PWD_QUALITY_NUMERIC, /**< Containing at least numeric characters */
78 SYNC_AGENT_DM_MDM_PWD_QUALITY_ALPHABETIC, /**< Containing at least alphabetic (or other symbol) characters */
79 SYNC_AGENT_DM_MDM_PWD_QUALITY_ALPHANUMERIC,
80 /**< Containing at least numeric and alphabetic characters */
81 } sync_agent_dm_mdm_pwd_quality_type_e;
84 * Enumerations of password change status
87 SYNC_AGENT_DM_MDM_PWD_CHANGED,
88 /**< Password successfully set or changed */
89 SYNC_AGENT_DM_MDM_PWD_FAILED,
90 /**< Device unlock failed */
91 SYNC_AGENT_DM_MDM_PWD_SUCCEEDED,
92 /**< Device unlock succeeded */
93 SYNC_AGENT_DM_MDM_PWD_EXPIRED,
94 /**< Password expired */
96 SYNC_AGENT_DM_MDM_RECOVERY_PASSWORD_FAILED,
97 /**< Device unlock failed by Password recovery */
98 SYNC_AGENT_DM_MDM_RECOVERY_PASSWORD_SUCCEEDED,
99 /**< Device unlock succeeded by Password recovery */
101 SYNC_AGENT_DM_MDM_PWD_QUALITY_CHANGED,
102 /**< Password quality successfully changed */
103 SYNC_AGENT_DM_MDM_PWD_MIN_LENGTH_CHANGED,
104 /**< Password min_length successfully changed */
105 SYNC_AGENT_DM_MDM_PWD_COMPLEX_CHAR_CHANGED,
106 /**< Password complex_char successfully changed */
107 SYNC_AGENT_DM_MDM_PWD_PATTERN_CHANGED,
108 /**< Password pattern successfully changed */
110 SYNC_AGENT_DM_MDM_PWD_STATUS_MAX
111 } sync_agent_dm_mdm_password_status_e;
114 * Enumerations of password policy
116 typedef struct _sync_agent_dm_mdm_password_policy_s {
118 /**< pwd quailty passwd length , refer to mdm_password_quality_t */
120 /**< minimum passwd length */
122 /**< maximum fail for wipe */
126 /**< minimum complex */
128 /**< history count */
130 /**< password recovery enabled */
131 } sync_agent_dm_mdm_password_policy_s;
139 #endif /* __cplusplus */
140 #endif /* MDM_TYPE_H_ */