1 /*
2  * Copyright (C) 2021 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 MEDIA_SCANNER_CONST_H
17 #define MEDIA_SCANNER_CONST_H
18 
19 #include <string>
20 
21 namespace OHOS {
22 namespace Media {
23 enum ScannerApiTypes : int32_t {
24     MEDIA_SCAN_DIR_ABILITY = 0,
25     MEDIA_SCAN_FILE_ABILITY,
26     MEDIA_SCAN_ON_CALLBACK,
27     MEDIA_GET_SCAN_STATUS
28 };
29 
30 enum ScanType : uint32_t {
31     SCAN_FILE = 0,
32     SCAN_DIR
33 };
34 
35 enum ScannerIpcErrorTypes : int32_t {
36     SCAN_IPC_ERR = -1,
37     SCAN_IPC_SUCCESS,
38     SCAN_PROXY_WR_ERR,
39     SCAN_PROXY_RD_ERR,
40     SCAN_PROXY_IF_TOKEN_WR_ERR,
41     SCAN_STUB_WR_ERR,
42     SCAN_STUB_RD_ERR,
43     SCAN_STUB_IF_TOKEN_INVALID
44 };
45 
46 enum ConnectionState : int32_t {
47     CONN_NONE,
48     CONN_IN_PROGRESS,
49     CONN_SUCCESS,
50     CONN_ERROR
51 };
52 
53 const std::string SCANNER_BUNDLE_NAME = "com.ohos.medialibrary.MediaScannerAbilityA";
54 const std::string SCANNER_ABILITY_NAME = "MediaScannerAbility";
55 const int32_t NO_PARENT = 0;
56 } // namespace Media
57 } // namespace OHOS
58 
59 #endif // MEDIA_SCANNER_CONST_H
60