• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 INTERFACES_INNERKITS_COMMON_GRAPHIC_COMMON_C_H
17 #define INTERFACES_INNERKITS_COMMON_GRAPHIC_COMMON_C_H
18 
19 // GraphicStandard Error, number just find fast, it may change
20 const int LOWERROR_MAX = 1000;
21 const int LOWERROR_FAILURE = 999;
22 const int LOWERROR_INVALID = 998;
23 enum GSError {
24     GSERROR_OK                    = 0,
25 
26     // 400 BAD_REQUEST
27     GSERROR_INVALID_ARGUMENTS     = 40001000,
28 
29     // 403 FORBIDDEN
30     GSERROR_NO_PERMISSION         = 40301000,
31 
32     // 404 NOT_FOUND
33     GSERROR_CONNOT_CONNECT_SAMGR  = 40401000,
34     GSERROR_CONNOT_CONNECT_SERVER = 40402000,
35     GSERROR_CONNOT_CONNECT_WESTON = 40403000,
36 
37     // 406 NOT_ACCEPTABLE
38     GSERROR_NO_BUFFER             = 40601000,
39     GSERROR_NO_ENTRY              = 40602000,
40     GSERROR_OUT_OF_RANGE          = 40603000,
41     GSERROR_NO_SCREEN             = 40604000,
42 
43     // 412 PRECONDITION_FAILED
44     GSERROR_INVALID_OPERATING     = 41201000,
45     GSERROR_NO_CONSUMER           = 41202000,
46     GSERROR_NOT_INIT              = 41203000,
47     GSERROR_TYPE_ERROR            = 41204000,
48     GSERROR_DESTROYED_OBJECT      = 41205000,
49 
50     // 500 INTERNAL ERROR
51     GSERROR_API_FAILED            = 50001000,
52     GSERROR_INTERNEL              = 50002000,
53     GSERROR_NO_MEM                = 50003000,
54     GSERROR_PROXY_NOT_INCLUDE     = 50004000,
55     GSERROR_SERVER_ERROR          = 50005000,
56     GSERROR_ANIMATION_RUNNING     = 50006000,
57 
58     // 501 NOT_IMPLEMENTED
59     GSERROR_NOT_IMPLEMENT         = 50101000,
60     GSERROR_NOT_SUPPORT           = 50102000,
61 
62     // 504 GATEWAY ERROR
63     GSERROR_BINDER                = 50401000,
64 
65     WM_OK = GSERROR_OK,
66     WM_ERROR_SAMGR = GSERROR_CONNOT_CONNECT_SAMGR,
67     WM_ERROR_WMS_NOT_FOUND = GSERROR_CONNOT_CONNECT_SERVER,
68     WM_ERROR_NOT_INIT = GSERROR_NOT_INIT,
69     WM_ERROR_API_FAILED = GSERROR_API_FAILED,
70     WM_ERROR_NEW = GSERROR_NO_MEM,
71     WM_ERROR_INNER = GSERROR_INTERNEL,
72     WM_ERROR_NULLPTR = GSERROR_INVALID_ARGUMENTS,
73     WM_ERROR_INVALID_PARAM = GSERROR_INVALID_ARGUMENTS,
74     WM_ERROR_CONNOT_CONNECT_WESTON = GSERROR_CONNOT_CONNECT_WESTON,
75     WM_ERROR_SERVER = GSERROR_SERVER_ERROR,
76     WM_ERROR_NOT_SUPPORT = GSERROR_NOT_SUPPORT,
77     WM_ERROR_DESTROYED_OBJECT = GSERROR_DESTROYED_OBJECT,
78 
79     SURFACE_ERROR_OK = GSERROR_OK,
80     SURFACE_ERROR_ERROR = GSERROR_INTERNEL,
81     SURFACE_ERROR_BINDER_ERROR = GSERROR_BINDER,
82     SURFACE_ERROR_NULLPTR = GSERROR_INVALID_ARGUMENTS,
83     SURFACE_ERROR_NO_ENTRY = GSERROR_NO_ENTRY,
84     SURFACE_ERROR_INVALID_OPERATING = GSERROR_INVALID_OPERATING,
85     SURFACE_ERROR_NO_BUFFER = GSERROR_NO_BUFFER,
86     SURFACE_ERROR_INVALID_PARAM = GSERROR_INVALID_ARGUMENTS,
87     SURFACE_ERROR_INIT = GSERROR_INTERNEL,
88     SURFACE_ERROR_NOMEM = GSERROR_NO_MEM,
89     SURFACE_ERROR_API_FAILED = GSERROR_API_FAILED,
90     SURFACE_ERROR_NOT_SUPPORT = GSERROR_NOT_SUPPORT,
91     SURFACE_ERROR_OUT_OF_RANGE = GSERROR_OUT_OF_RANGE,
92     SURFACE_ERROR_TYPE_ERROR = GSERROR_TYPE_ERROR,
93     SURFACE_ERROR_NO_CONSUMER = GSERROR_NO_CONSUMER,
94 
95     VSYNC_ERROR_OK = GSERROR_OK,
96     VSYNC_ERROR_API_FAILED = GSERROR_API_FAILED,
97     VSYNC_ERROR_INVALID_OPERATING = GSERROR_INVALID_OPERATING,
98     VSYNC_ERROR_NULLPTR = GSERROR_INVALID_ARGUMENTS,
99     VSYNC_ERROR_BINDER_ERROR = GSERROR_BINDER,
100     VSYNC_ERROR_SAMGR = GSERROR_CONNOT_CONNECT_SAMGR,
101     VSYNC_ERROR_SERVICE_NOT_FOUND = GSERROR_SERVER_ERROR,
102     VSYNC_ERROR_PROXY_NOT_INCLUDE = GSERROR_PROXY_NOT_INCLUDE,
103     VSYNC_ERROR_INNER = GSERROR_INTERNEL,
104     VSYNC_ERROR_INVALID_ARGUMENTS = GSERROR_INVALID_ARGUMENTS,
105 };
106 
107 #endif // INTERFACES_INNERKITS_COMMON_GRAPHIC_COMMON_H
108