1 /* 2 * Copyright (c) 2023-2024 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef OS_ACCOUNT_FRAMEWORK_ACCOUNTMGR_SERVICE_IPC_INTERFACE_CODE_H 17 #define OS_ACCOUNT_FRAMEWORK_ACCOUNTMGR_SERVICE_IPC_INTERFACE_CODE_H 18 19 #include <cstdint> 20 21 /* SAID: 200 */ 22 namespace OHOS { 23 namespace AccountSA { 24 enum class AccountMgrInterfaceCode : uint32_t { 25 UPDATE_OHOS_ACCOUNT_INFO = 1, 26 QUERY_OHOS_ACCOUNT_INFO = 2, 27 QUERY_OHOS_ACCOUNT_QUIT_TIPS = 3, 28 QUERY_OHOS_ACCOUNT_INFO_BY_USER_ID = 4, 29 SET_OHOS_ACCOUNT_INFO = 5, 30 GET_OHOS_ACCOUNT_INFO = 6, 31 GET_OHOS_ACCOUNT_INFO_BY_USER_ID = 7, 32 SET_OHOS_ACCOUNT_INFO_BY_USER_ID = 8, 33 SUBSCRIBE_DISTRIBUTED_ACCOUNT_EVENT = 9, 34 UNSUBSCRIBE_DISTRIBUTED_ACCOUNT_EVENT = 10, 35 QUERY_DEVICE_ACCOUNT_ID = 104, 36 GET_APP_ACCOUNT_SERVICE = 105, 37 GET_OS_ACCOUNT_SERVICE = 106, 38 GET_ACCOUNT_IAM_SERVICE = 107, 39 GET_DOMAIN_ACCOUNT_SERVICE = 108, 40 }; 41 42 enum class OsAccountInterfaceCode : uint32_t { 43 CREATE_OS_ACCOUNT = 0, 44 CREATE_OS_ACCOUNT_WITH_SHORT_NAME, 45 CREATE_OS_ACCOUNT_WITH_FULL_INFO, 46 UPDATE_OS_ACCOUNT_WITH_FULL_INFO, 47 CREATE_OS_ACCOUNT_FOR_DOMAIN, 48 REMOVE_OS_ACCOUNT, 49 IS_OS_ACCOUNT_EXISTS, 50 IS_OS_ACCOUNT_ACTIVED, 51 IS_OS_ACCOUNT_CONSTRAINT_ENABLE, 52 CHECK_OS_ACCOUNT_CONSTRAINT_ENABLED, 53 IS_OS_ACCOUNT_VERIFIED, 54 GET_CREATED_OS_ACCOUNT_COUNT, 55 GET_OS_ACCOUNT_LOCAL_ID_FROM_PROCESS, 56 IS_MAIN_OS_ACCOUNT, 57 GET_OS_ACCOUNT_LOCAL_ID_FROM_DOMAIN, 58 QUERY_MAX_OS_ACCOUNT_NUMBER, 59 GET_OS_ACCOUNT_ALL_CONSTRAINTS, 60 QUERY_ALL_CREATED_OS_ACCOUNTS, 61 QUERY_CURRENT_OS_ACCOUNT, 62 QUERY_OS_ACCOUNT_BY_ID, 63 GET_OS_ACCOUNT_TYPE_FROM_PROCESS, 64 GET_OS_ACCOUNT_TYPE, 65 GET_OS_ACCOUNT_PROFILE_PHOTO, 66 IS_MULTI_OS_ACCOUNT_ENABLE, 67 SET_OS_ACCOUNT_NAME, 68 SET_OS_ACCOUNT_CONSTRAINTS, 69 SET_OS_ACCOUNT_PROFILE_PHOTO, 70 ACTIVATE_OS_ACCOUNT, 71 DEACTIVATE_OS_ACCOUNT, 72 DEACTIVATE_ALL_OS_ACCOUNTS, 73 START_OS_ACCOUNT, 74 SUBSCRIBE_OS_ACCOUNT, 75 UNSUBSCRIBE_OS_ACCOUNT, 76 GET_OS_ACCOUNT_LOCAL_ID_FOR_SERIAL_NUMBER, 77 GET_SERIAL_NUMBER_FOR_OS_ACCOUNT, 78 GET_OS_ACCOUNT_SWITCH_MOD, 79 IS_CURRENT_OS_ACCOUNT_VERIFIED, 80 IS_OS_ACCOUNT_COMPLETED, 81 SET_CURRENT_OS_ACCOUNT_IS_VERIFIED, 82 SET_OS_ACCOUNT_IS_VERIFIED, 83 DUMP_STATE, 84 GET_CREATED_OS_ACCOUNT_NUM_FROM_DATABASE, 85 GET_SERIAL_NUM_FROM_DATABASE, 86 GET_MAX_ALLOW_CREATE_ID_FROM_DATABASE, 87 GET_OS_ACCOUNT_FROM_DATABASE, 88 GET_OS_ACCOUNT_LIST_FROM_DATABASE, 89 QUERY_ACTIVE_OS_ACCOUNT_IDS, 90 QUERY_OS_ACCOUNT_CONSTRAINT_SOURCE_TYPES, 91 SET_GLOBAL_OS_ACCOUNT_CONSTRAINTS, 92 SET_SPECIFIC_OS_ACCOUNT_CONSTRAINTS, 93 SET_DEFAULT_ACTIVATED_OS_ACCOUNT, 94 GET_DEFAULT_ACTIVATED_OS_ACCOUNT, 95 GET_OS_ACCOUNT_SHORT_NAME, 96 GET_OS_ACCOUNT_NAME, 97 GET_OS_ACCOUNT_SHORT_NAME_BY_ID, 98 IS_OS_ACCOUNT_FOREGROUND, 99 GET_FOREGROUND_OS_ACCOUNT_LOCAL_ID, 100 GET_FOREGROUND_OS_ACCOUNTS, 101 GET_BACKGROUND_OS_ACCOUNT_LOCAL_IDS, 102 SET_OS_ACCOUNT_TO_BE_REMOVED, 103 QUERY_MAX_LOGGED_IN_OS_ACCOUNT_NUMBER 104 }; 105 106 enum class AppAccountInterfaceCode : uint32_t { 107 ADD_ACCOUNT = 0, 108 ADD_ACCOUNT_IMPLICITLY, 109 DELETE_ACCOUNT, 110 GET_ACCOUNT_EXTRA_INFO, 111 SET_ACCOUNT_EXTRA_INFO, 112 ENABLE_APP_ACCESS, 113 DISABLE_APP_ACCESS, 114 SET_APP_ACCESS, 115 CHECK_APP_ACCOUNT_SYNC_ENABLE, 116 SET_APP_ACCOUNT_SYNC_ENABLE, 117 GET_ASSOCIATED_DATA, 118 SET_ASSOCIATED_DATA, 119 GET_ACCOUNT_CREDENTIAL, 120 SET_ACCOUNT_CREDENTIAL, 121 AUTHENTICATE, 122 GET_OAUTH_TOKEN, 123 GET_AUTH_TOKEN, 124 SET_OAUTH_TOKEN, 125 DELETE_OAUTH_TOKEN, 126 DELETE_AUTH_TOKEN, 127 SET_OAUTH_TOKEN_VISIBILITY, 128 SET_AUTH_TOKEN_VISIBILITY, 129 CHECK_OAUTH_TOKEN_VISIBILITY, 130 CHECK_AUTH_TOKEN_VISIBILITY, 131 GET_AUTHENTICATOR_INFO, 132 GET_ALL_OAUTH_TOKENS, 133 GET_OAUTH_LIST, 134 GET_AUTH_LIST, 135 GET_AUTHENTICATOR_CALLBACK, 136 CLEAR_OAUTH_TOKEN, 137 GET_ALL_ACCOUNTS, 138 GET_ALL_ACCESSIBLE_ACCOUNTS, 139 QUERY_ALL_ACCESSIBLE_ACCOUNTS, 140 SUBSCRIBE_ACCOUNT, 141 UNSUBSCRIBE_ACCOUNT, 142 CHECK_APP_ACCESS, 143 DELETE_ACCOUNT_CREDENTIAL, 144 SELECT_ACCOUNTS_BY_OPTIONS, 145 VERIFY_CREDENTIAL, 146 CHECK_ACCOUNT_LABELS, 147 SET_AUTHENTICATOR_PROPERTIES, 148 CREATE_ACCOUNT, 149 CREATE_ACCOUNT_IMPLICITLY, 150 }; 151 152 enum class AccountIAMInterfaceCode : uint32_t { 153 OPEN_SESSION = 0, 154 CLOSE_SESSION, 155 ADD_CREDENTIAL, 156 UPDATE_CREDENTIAL, 157 CANCEL, 158 DEL_CRED, 159 DEL_USER, 160 GET_CREDENTIAL_INFO, 161 PREPARE_REMOTE_AUTH, 162 AUTH_USER, 163 CANCEL_AUTH, 164 GET_AVAILABLE_STATUS, 165 GET_PROPERTY, 166 SET_PROPERTY, 167 GET_ENROLLED_ID, 168 GET_ACCOUNT_STATE, 169 }; 170 171 enum class DomainAccountInterfaceCode : uint32_t { 172 REGISTER_PLUGIN = 0, 173 UNREGISTER_PLUGIN = 1, 174 DOMAIN_AUTH = 2, 175 DOMAIN_AUTH_USER = 3, 176 DOMAIN_AUTH_WITH_POPUP = 4, 177 DOMAIN_HAS_DOMAIN_ACCOUNT = 5, 178 DOMAIN_UPDATE_ACCOUNT_TOKEN = 6, 179 DOMAIN_GET_ACCESS_TOKEN = 7, 180 DOMAIN_ACCOUNT_STATUS_ENQUIRY = 8, 181 DOMAIN_ACCOUNT_STATUS_LISTENER_REGISTER = 9, 182 DOMAIN_ACCOUNT_STATUS_LISTENER_UNREGISTER = 10, 183 DOMAIN_IS_AUTHENTICATION_EXPIRED, 184 DOMAIN_SET_ACCOUNT_POLICY, 185 DOMAIN_GET_ACCOUNT_INFO, 186 ADD_SERVER_CONFIG, 187 REMOVE_SERVER_CONFIG, 188 GET_ACCOUNT_SERVER_CONFIG, 189 DOMAIN_UPDATE_ACCOUNT_INFO, 190 }; 191 192 enum class DomainAccountPluginInterfaceCode : int32_t { 193 DOMAIN_PLUGIN_AUTH = 0, 194 DOMAIN_PLUGIN_GET_AUTH_STATUS_INFO = 1, 195 DOMAIN_PLUGIN_GET_DOMAIN_ACCOUNT_INFO = 2, 196 DOMAIN_PLUGIN_ON_ACCOUNT_BOUND = 3, 197 DOMAIN_PLUGIN_ON_ACCOUNT_UNBOUND = 4, 198 DOMAIN_PLUGIN_IS_ACCOUNT_TOKEN_VALID = 5, 199 DOMAIN_PLUGIN_GET_ACCESS_TOKEN = 6, 200 }; 201 202 enum class DomainAccountCallbackInterfaceCode : uint32_t { 203 DOMAIN_ACCOUNT_CALLBACK_ON_RESULT = 0, 204 }; 205 206 enum class OsAccountEventInterfaceCode : uint32_t { 207 ACCOUNT_CHANGED = 0, 208 ACCOUNT_SWITCHED = 1, 209 }; 210 211 enum class DistributedAccountEventInterfaceCode : uint32_t { 212 ON_ACCOUNT_CHANGED = 0, 213 }; 214 215 enum class AppAccountAuthorizationExtensionCallbackInterfaceCode : uint32_t { 216 ON_RESULT = 0, 217 ON_REQUEST_REDIRECTED, 218 }; 219 220 enum class AppAccountAuthenticatorCallbackInterfaceCode : uint32_t { 221 ACCOUNT_RESULT = 0, 222 ACCOUNT_REQUEST_REDIRECTED, 223 ACCOUNT_REQUEST_CONTINUED, 224 }; 225 226 enum class AppAccountEventInterfaceCode : uint32_t { 227 ACCOUNT_CHANGED = 0, 228 }; 229 230 enum class AppAccountAuthenticatorInterfaceCode : uint32_t { 231 ADD_ACCOUNT_IMPLICITLY = 0, 232 AUTHENTICATE, 233 VERIFY_CREDENTIAL, 234 CHECK_ACCOUNT_LABELS, 235 SET_PROPERTIES, 236 IS_ACCOUNT_REMOVABLE, 237 CREATE_ACCOUNT_IMPLICITLY, 238 AUTH, 239 }; 240 241 enum class AppAccountAuthorizationExtensionInterfaceCode : uint32_t { 242 START_AUTHENTICATION = 0, 243 }; 244 245 enum class AccountIAMCallbackInterfaceCode : uint32_t { 246 ON_ACQUIRE_INFO = 0, 247 ON_RESULT, 248 }; 249 250 enum class IDMCallbackInterfaceCode : uint32_t { 251 ON_ACQUIRE_INFO = 0, 252 ON_RESULT, 253 }; 254 255 enum class GetCredInfoCallbackInterfaceCode : uint32_t { 256 ON_CREDENTIAL_INFO = 0, 257 }; 258 259 enum class GetSetPropCallbackInterfaceCode : uint32_t { 260 ON_RESULT = 0, 261 }; 262 263 enum class GetEnrolledIdCallbackInterfaceCode : uint32_t { 264 ON_ENROLLED_ID = 0, 265 }; 266 267 enum class PreRemoteAuthCallbackInterfaceCode : uint32_t { 268 ON_RESULT = 0, 269 }; 270 } // namespace AccountSA 271 } // namespace OHOS 272 #endif // OS_ACCOUNT_FRAMEWORK_ACCOUNTMGR_SERVICE_IPC_INTERFACE_CODE_H 273