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 /**
17  * @addtogroup OHAVSession
18  * @{
19  *
20  * @brief Provide the definition of the C interface for the avsession module.
21  * @since 13
22  */
23 
24 /**
25  * @file native_avsession_errors.h
26  *
27  * @brief Declare avsession related error.
28  *
29  * @library libohavsession.so
30  * @syscap SystemCapability.Multimedia.AVSession.Core
31  * @kit AVSessionKit
32  * @since 13
33  */
34 
35 #ifndef NATIVE_AVSESSION_ERRORS_H
36 #define NATIVE_AVSESSION_ERRORS_H
37 
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41 
42 /**
43  * @brief AVSession error code
44  *
45  * @since 13
46  * @version 1.0
47  */
48 typedef enum {
49     /**
50      * @error The operation completed successfully.
51      */
52     AV_SESSION_ERR_SUCCESS = 0,
53 
54     /**
55      * @error Invalid parameter。
56      */
57     AV_SESSION_ERR_INVALID_PARAMETER = 401,
58 
59     /**
60      * @error Service exception.
61      */
62     AV_SESSION_ERR_SERVICE_EXCEPTION = 6600101,
63 
64     /**
65      * @error The session does not exist.
66      */
67     AV_SESSION_ERR_CODE_SESSION_NOT_EXIST = 6600102,
68 
69     /**
70      * @error Invalid session command.
71      */
72     AV_SESSION_ERR_CODE_COMMAND_INVALID = 6600105,
73 
74     /**
75      * @error The session is not activated.
76      */
77     AV_SESSION_ERR_CODE_SESSION_INACTIVE = 6600106,
78 
79     /**
80      * @error Too many commands or events.
81      */
82     AV_SESSION_ERR_CODE_MESSAGE_OVERLOAD = 6600107,
83 } AVSession_ErrCode;
84 
85 #ifdef __cplusplus
86 }
87 #endif
88 
89 #endif // NATIVE_AVSESSION_ERRORS_H
90 /** @} */