1 /* 2 * Copyright (c) 2023 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 QUERY_DEVICE_ACCOUNT_ID = 104, 34 GET_APP_ACCOUNT_SERVICE = 105, 35 GET_OS_ACCOUNT_SERVICE = 106, 36 GET_ACCOUNT_IAM_SERVICE = 107, 37 GET_DOMAIN_ACCOUNT_SERVICE = 108, 38 }; 39 40 enum class OsAccountInterfaceCode : uint32_t { 41 CREATE_OS_ACCOUNT = 0, 42 CREATE_OS_ACCOUNT_FOR_DOMAIN, 43 REMOVE_OS_ACCOUNT, 44 IS_OS_ACCOUNT_EXISTS, 45 IS_OS_ACCOUNT_ACTIVED, 46 IS_OS_ACCOUNT_CONSTRAINT_ENABLE, 47 CHECK_OS_ACCOUNT_CONSTRAINT_ENABLED, 48 IS_OS_ACCOUNT_VERIFIED, 49 GET_CREATED_OS_ACCOUNT_COUNT, 50 GET_OS_ACCOUNT_LOCAL_ID_FROM_PROCESS, 51 IS_MAIN_OS_ACCOUNT, 52 GET_OS_ACCOUNT_LOCAL_ID_FROM_DOMAIN, 53 QUERY_MAX_OS_ACCOUNT_NUMBER, 54 GET_OS_ACCOUNT_ALL_CONSTRAINTS, 55 QUERY_ALL_CREATED_OS_ACCOUNTS, 56 QUERY_CURRENT_OS_ACCOUNT, 57 QUERY_OS_ACCOUNT_BY_ID, 58 GET_OS_ACCOUNT_TYPE_FROM_PROCESS, 59 GET_OS_ACCOUNT_PROFILE_PHOTO, 60 IS_MULTI_OS_ACCOUNT_ENABLE, 61 SET_OS_ACCOUNT_NAME, 62 SET_OS_ACCOUNT_CONSTRAINTS, 63 SET_OS_ACCOUNT_PROFILE_PHOTO, 64 ACTIVATE_OS_ACCOUNT, 65 START_OS_ACCOUNT, 66 STOP_OS_ACCOUNT, 67 SUBSCRIBE_OS_ACCOUNT, 68 UNSUBSCRIBE_OS_ACCOUNT, 69 GET_OS_ACCOUNT_LOCAL_ID_FOR_SERIAL_NUMBER, 70 GET_SERIAL_NUMBER_FOR_OS_ACCOUNT, 71 GET_OS_ACCOUNT_SWITCH_MOD, 72 IS_CURRENT_OS_ACCOUNT_VERIFIED, 73 IS_OS_ACCOUNT_COMPLETED, 74 SET_CURRENT_OS_ACCOUNT_IS_VERIFIED, 75 SET_OS_ACCOUNT_IS_VERIFIED, 76 DUMP_STATE, 77 GET_CREATED_OS_ACCOUNT_NUM_FROM_DATABASE, 78 GET_SERIAL_NUM_FROM_DATABASE, 79 GET_MAX_ALLOW_CREATE_ID_FROM_DATABASE, 80 GET_OS_ACCOUNT_FROM_DATABASE, 81 GET_OS_ACCOUNT_LIST_FROM_DATABASE, 82 QUERY_ACTIVE_OS_ACCOUNT_IDS, 83 QUERY_OS_ACCOUNT_CONSTRAINT_SOURCE_TYPES, 84 SET_GLOBAL_OS_ACCOUNT_CONSTRAINTS, 85 SET_SPECIFIC_OS_ACCOUNT_CONSTRAINTS, 86 SET_DEFAULT_ACTIVATED_OS_ACCOUNT, 87 GET_DEFAULT_ACTIVATED_OS_ACCOUNT, 88 }; 89 90 enum class AppAccountInterfaceCode : uint32_t { 91 ADD_ACCOUNT = 0, 92 ADD_ACCOUNT_IMPLICITLY, 93 DELETE_ACCOUNT, 94 GET_ACCOUNT_EXTRA_INFO, 95 SET_ACCOUNT_EXTRA_INFO, 96 ENABLE_APP_ACCESS, 97 DISABLE_APP_ACCESS, 98 SET_APP_ACCESS, 99 CHECK_APP_ACCOUNT_SYNC_ENABLE, 100 SET_APP_ACCOUNT_SYNC_ENABLE, 101 GET_ASSOCIATED_DATA, 102 SET_ASSOCIATED_DATA, 103 GET_ACCOUNT_CREDENTIAL, 104 SET_ACCOUNT_CREDENTIAL, 105 AUTHENTICATE, 106 GET_OAUTH_TOKEN, 107 GET_AUTH_TOKEN, 108 SET_OAUTH_TOKEN, 109 DELETE_OAUTH_TOKEN, 110 DELETE_AUTH_TOKEN, 111 SET_OAUTH_TOKEN_VISIBILITY, 112 SET_AUTH_TOKEN_VISIBILITY, 113 CHECK_OAUTH_TOKEN_VISIBILITY, 114 CHECK_AUTH_TOKEN_VISIBILITY, 115 GET_AUTHENTICATOR_INFO, 116 GET_ALL_OAUTH_TOKENS, 117 GET_OAUTH_LIST, 118 GET_AUTH_LIST, 119 GET_AUTHENTICATOR_CALLBACK, 120 CLEAR_OAUTH_TOKEN, 121 GET_ALL_ACCOUNTS, 122 GET_ALL_ACCESSIBLE_ACCOUNTS, 123 QUERY_ALL_ACCESSIBLE_ACCOUNTS, 124 SUBSCRIBE_ACCOUNT, 125 UNSUBSCRIBE_ACCOUNT, 126 CHECK_APP_ACCESS, 127 DELETE_ACCOUNT_CREDENTIAL, 128 SELECT_ACCOUNTS_BY_OPTIONS, 129 VERIFY_CREDENTIAL, 130 CHECK_ACCOUNT_LABELS, 131 SET_AUTHENTICATOR_PROPERTIES, 132 CREATE_ACCOUNT, 133 CREATE_ACCOUNT_IMPLICITLY, 134 EXECUTE_REQUEST, 135 }; 136 137 enum class AccountIAMInterfaceCode : uint32_t { 138 OPEN_SESSION = 0, 139 CLOSE_SESSION, 140 ADD_CREDENTIAL, 141 UPDATE_CREDENTIAL, 142 CANCEL, 143 DEL_CRED, 144 DEL_USER, 145 GET_CREDENTIAL_INFO, 146 AUTH_USER, 147 CANCEL_AUTH, 148 GET_AVAILABLE_STATUS, 149 GET_PROPERTY, 150 SET_PROPERTY, 151 GET_ACCOUNT_STATE, 152 }; 153 154 enum class DomainAccountInterfaceCode : uint32_t { 155 REGISTER_PLUGIN = 0, 156 UNREGISTER_PLUGIN = 1, 157 DOMAIN_AUTH = 2, 158 DOMAIN_AUTH_USER = 3, 159 DOMAIN_AUTH_WITH_POPUP = 4, 160 DOMAIN_HAS_DOMAIN_ACCOUNT = 5, 161 DOMAIN_UPDATE_ACCOUNT_TOKEN = 6, 162 DOMAIN_GET_ACCESS_TOKEN = 7, 163 DOMAIN_ACCOUNT_STATUS_ENQUIRY = 8, 164 DOMAIN_ACCOUNT_STATUS_LISTENER_REGISTER = 9, 165 DOMAIN_ACCOUNT_STATUS_LISTENER_UNREGISTER = 10, 166 DOMAIN_ACCOUNT_STATUS_LISTENER_REGISTER_BY_INFO = 11, 167 DOMAIN_ACCOUNT_STATUS_LISTENER_UNREGISTER_BY_INFO = 12, 168 DOMAIN_GET_ACCOUNT_INFO, 169 }; 170 171 enum class DomainAccountPluginInterfaceCode : int32_t { 172 DOMAIN_PLUGIN_AUTH = 0, 173 DOMAIN_PLUGIN_GET_AUTH_STATUS_INFO = 1, 174 DOMAIN_PLUGIN_GET_DOMAIN_ACCOUNT_INFO = 2, 175 DOMAIN_PLUGIN_ON_ACCOUNT_BOUND = 3, 176 DOMAIN_PLUGIN_ON_ACCOUNT_UNBOUND = 4, 177 DOMAIN_PLUGIN_IS_ACCOUNT_TOKEN_VALID = 5, 178 DOMAIN_PLUGIN_GET_ACCESS_TOKEN = 6, 179 }; 180 181 enum class DomainAccountCallbackInterfaceCode : uint32_t { 182 DOMAIN_ACCOUNT_CALLBACK_ON_RESULT = 0, 183 }; 184 185 enum class OsAccountEventInterfaceCode : uint32_t { 186 ACCOUNT_CHANGED = 0, 187 }; 188 189 enum class AppAccountAuthorizationExtensionCallbackInterfaceCode : uint32_t { 190 ON_RESULT = 0, 191 ON_REQUEST_REDIRECTED, 192 }; 193 194 enum class AppAccountAuthenticatorCallbackInterfaceCode : uint32_t { 195 ACCOUNT_RESULT = 0, 196 ACCOUNT_REQUEST_REDIRECTED, 197 ACCOUNT_REQUEST_CONTINUED, 198 }; 199 200 enum class AppAccountEventInterfaceCode : uint32_t { 201 ACCOUNT_CHANGED = 0, 202 }; 203 204 enum class AppAccountAuthenticatorInterfaceCode : uint32_t { 205 ADD_ACCOUNT_IMPLICITLY = 0, 206 AUTHENTICATE, 207 VERIFY_CREDENTIAL, 208 CHECK_ACCOUNT_LABELS, 209 SET_PROPERTIES, 210 IS_ACCOUNT_REMOVABLE, 211 CREATE_ACCOUNT_IMPLICITLY, 212 AUTH, 213 }; 214 215 enum class AppAccountAuthorizationExtensionInterfaceCode : uint32_t { 216 START_AUTHENTICATION = 0, 217 }; 218 219 enum class AccountIAMCallbackInterfaceCode : uint32_t { 220 ON_ACQUIRE_INFO = 0, 221 ON_RESULT, 222 }; 223 224 enum class IDMCallbackInterfaceCode : uint32_t { 225 ON_ACQUIRE_INFO = 0, 226 ON_RESULT, 227 }; 228 229 enum class GetCredInfoCallbackInterfaceCode : uint32_t { 230 ON_CREDENTIAL_INFO = 0, 231 }; 232 233 enum class GetSetPropCallbackInterfaceCode : uint32_t { 234 ON_RESULT = 0, 235 }; 236 } // namespace AccountSA 237 } // namespace OHOS 238 #endif // OS_ACCOUNT_FRAMEWORK_ACCOUNTMGR_SERVICE_IPC_INTERFACE_CODE_H 239