1 /* 2 * Copyright (C) 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 INTERFACES_INNERKITS_NATIVE_INCLUDE_MEDIA_APP_URI_PERMISSION_H_ 17 #define INTERFACES_INNERKITS_NATIVE_INCLUDE_MEDIA_APP_URI_PERMISSION_H_ 18 19 #include <string> 20 #include <set> 21 22 namespace OHOS::Media { 23 #define EXPORT __attribute__ ((visibility ("default"))) 24 25 class AppUriPermissionColumn { 26 public: 27 // columns 28 static const std::string ID EXPORT; 29 static const std::string APP_ID EXPORT; 30 static const std::string FILE_ID EXPORT; 31 static const std::string URI_TYPE EXPORT; 32 static const std::string PERMISSION_TYPE EXPORT; 33 static const std::string DATE_MODIFIED EXPORT; 34 35 // uriTypes 36 static const int URI_PHOTO EXPORT; 37 static const int URI_AUDIO EXPORT; 38 static const std::set<int> URI_TYPES_ALL EXPORT; 39 40 // permissionTypes 41 static const int PERMISSION_TEMPORARY_READ EXPORT; 42 static const int PERMISSION_PERSIST_READ EXPORT; 43 static const int PERMISSION_TEMPORARY_WRITE EXPORT; 44 static const int PERMISSION_TEMPORARY_READ_WRITE EXPORT; 45 static const int PERMISSION_PERSIST_READ_WRITE EXPORT; 46 static const std::set<int> PERMISSION_TYPES_ALL EXPORT; 47 static const std::set<int> PERMISSION_TYPES_PICKER EXPORT; 48 static const std::set<int> PERMISSION_TYPES_TEMPORARY EXPORT; 49 static const std::set<int> PERMISSION_TYPES_PERSIST EXPORT; 50 51 // index 52 static const std::string URI_URITYPE_APPID_INDEX EXPORT; 53 54 // table name 55 static const std::string APP_URI_PERMISSION_TABLE EXPORT; 56 57 // default fetch columns 58 static const std::set<std::string> DEFAULT_FETCH_COLUMNS EXPORT; 59 60 // create sql 61 static const std::string CREATE_APP_URI_PERMISSION_TABLE EXPORT; 62 static const std::string CREATE_URI_URITYPE_APPID_INDEX EXPORT; 63 64 // all columns 65 static const std::set<std::string> ALL_COLUMNS EXPORT; 66 }; 67 68 } // namespace OHOS::Media 69 #endif // INTERFACES_INNERKITS_NATIVE_INCLUDE_MEDIA_APP_URI_PERMISSION_H_