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 OHOS_ABILITYRUNTIME_CONNECTION_OBSERVER_ERRORS_H
17 #define OHOS_ABILITYRUNTIME_CONNECTION_OBSERVER_ERRORS_H
18 
19 #include "errors.h"
20 
21 namespace OHOS {
22 namespace AbilityRuntime {
23 enum {
24     /**
25      *  Module type: Ability  connection kit side
26      */
27     ABILITY_MODULE_TYPE_CONNECTION_KIT = 2,
28 };
29 
30 // offset of aafwk error, only be used in this file.
31 constexpr ErrCode KIT_OFFSET = ErrCodeOffset(SUBSYS_AAFWK, ABILITY_MODULE_TYPE_CONNECTION_KIT);
32 
33 enum {
34     /**
35      * Result(2228224) for no connection client implement.
36      */
37     ERR_NO_CLIENT_IMPL = KIT_OFFSET,
38 
39     /**
40      * Result(2228225) for invalid observer.
41      */
42     ERR_INVALID_OBSERVER,
43 
44     /**
45      * Result(2228226) for observer was already registered.
46      */
47     ERR_OBSERVER_ALREADY_REGISTERED,
48 
49     /**
50      * Result(2228227) for observer that not registered.
51      */
52     ERR_OBSERVER_NOT_REGISTERED,
53 
54     /**
55      * Result(2228228) for no proxy.
56      */
57     ERR_NO_PROXY,
58 
59     /**
60      * Result(2228229) for no proxy.
61      */
62     ERR_REGISTER_FAILED,
63 
64     /**
65      * Result(2228230) for service not init.
66      */
67     ERR_SERVICE_NOT_INIT,
68 
69     /**
70      * Result(2228231) for service invalid info.
71      */
72     ERR_READ_INFO_FAILED,
73 };
74 }  // namespace AbilityRuntime
75 }  // namespace OHOS
76 #endif  // OHOS_ABILITYRUNTIME_CONNECTION_OBSERVER_ERRORS_H