• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021-2022 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_SERVICES_ACCOUNTMGR_INCLUDE_APPACCOUNT_APP_ACCOUNT_CONSTANTS_H
17 #define OS_ACCOUNT_SERVICES_ACCOUNTMGR_INCLUDE_APPACCOUNT_APP_ACCOUNT_CONSTANTS_H
18 
19 #include "account_error_no.h"
20 #include "iaccount_info.h"
21 #include "parcel.h"
22 
23 namespace OHOS {
24 namespace AccountSA {
25 namespace Constants {
26 const char APP_ACCOUNT_APP_ID[] = "app_account_manager_service";
27 const char KEY_NAME[] = "name";
28 const char KEY_TOKEN[] = "token";
29 const char KEY_ACTION[] = "action";
30 const char KEY_AUTH_TYPE[] = "authType";
31 const char KEY_SESSION_ID[] = "sessionId";
32 const char KEY_CALLER_BUNDLE_NAME[] = "callerBundleName";
33 const char KEY_CALLER_PID[] = "callerPid";
34 const char KEY_CALLER_UID[] = "callerUid";
35 const char KEY_BOOLEAN_RESULT[] = "booleanResult";
36 const char KEY_ACCOUNT_NAMES[] = "accountNames";
37 const char KEY_ACCOUNT_OWNERS[] = "accountOwners";
38 const char SPECIAL_CHARACTERS[] = " ";
39 const char HYPHEN[] = "#";
40 const char API_V9[] = "apiV9";
41 
42 constexpr std::size_t APP_ACCOUNT_SUBSCRIBER_MAX_SIZE = 200;
43 constexpr std::size_t NAME_MAX_SIZE = 512;
44 constexpr std::size_t EXTRA_INFO_MAX_SIZE = 1024;
45 constexpr std::size_t BUNDLE_NAME_MAX_SIZE = 512;
46 constexpr std::size_t ASSOCIATED_KEY_MAX_SIZE = 1024;
47 constexpr std::size_t ASSOCIATED_VALUE_MAX_SIZE = 1024;
48 constexpr std::size_t CREDENTIAL_TYPE_MAX_SIZE = 1024;
49 constexpr std::size_t CREDENTIAL_MAX_SIZE = 1024;
50 constexpr std::size_t TOKEN_MAX_SIZE = 1024;
51 constexpr std::size_t OWNER_MAX_SIZE = 1024;
52 constexpr std::size_t AUTH_TYPE_MAX_SIZE = 1024;
53 constexpr std::size_t ABILITY_NAME_MAX_SIZE = 512;
54 constexpr std::size_t SESSION_ID_MAX_SIZE = 1024;
55 constexpr std::size_t MAX_ALLOWED_ARRAY_SIZE_INPUT = 1024;
56 constexpr std::size_t MAX_CUSTOM_DATA_SIZE = 1024;
57 constexpr uint32_t API_VERSION7 = 7;
58 constexpr uint32_t API_VERSION8 = 8;
59 constexpr uint32_t API_VERSION9 = 9;
60 };  // namespace Constants
61 }  // namespace AccountSA
62 }  // namespace OHOS
63 
64 #endif  // OS_ACCOUNT_SERVICES_ACCOUNTMGR_INCLUDE_APPACCOUNT_APP_ACCOUNT_CONSTANTS_H
65