1 /* 2 * Copyright (c) 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 FILE_ACCESS_FRAMEWORK_ERRNO_H 17 #define FILE_ACCESS_FRAMEWORK_ERRNO_H 18 19 #include "errors.h" 20 21 namespace OHOS { 22 namespace FileAccessFwk { 23 24 const int ERR_EXIST = 13900015; 25 const int ERR_NOMEM = 13900011; 26 const int ERR_PERM = 13900001; 27 const int BASE_OFFSET = 14300001; 28 enum { 29 ERR_OK = 0, 30 E_IPCS = BASE_OFFSET, // IPC error 31 E_URIS, // Invalid uri 32 E_GETINFO, // Fail to get fileextension info 33 E_GETRESULT, // Get wrong result 34 E_REGISTER, // Fail to register notification 35 E_REMOVE, // Fail to remove notification 36 E_INIT_NOTIFY_AGENT, // Fail to init notification agent 37 E_NOTIFY, // Fail to notify agent 38 E_CONNECT, // Fail to connect file access extension ability 39 E_COUNT, // Too many records 40 E_CALLBACK_AND_URI_HAS_NOT_RELATIONS, // Uri and callback do not has relations, can not unregister 41 E_CALLBACK_IS_NOT_REGISTER, // CallBack is not registered, can not unregister 42 E_CAN_NOT_FIND_URI, // Can not find registered uri 43 E_DO_NOT_HAVE_PARENT, // Do not have parent uri in observerNode 44 E_LOAD_SA, // load SA failed 45 E_PERMISSION = 201, // Permission verification failed 46 E_PERMISSION_SYS // is not system app 47 }; 48 } // namespace FileAccessFwk 49 } // namespace OHOS 50 #endif // FILE_ACCESS_FRAMEWORK_ERRNO_H