summaryrefslogtreecommitdiff
path: root/audio_codec/libraac/include/helix_result.h (plain)
blob: 6c600b45eb24df79b186e8e89fe1898f42bed375
1/* ***** BEGIN LICENSE BLOCK *****
2 * Source last modified: $Id: helix_result.h,v 1.1.1.1.2.1 2005/05/04 18:20:57 hubbe Exp $
3 *
4 * REALNETWORKS CONFIDENTIAL--NOT FOR DISTRIBUTION IN SOURCE CODE FORM
5 * Portions Copyright (c) 1995-2005 RealNetworks, Inc.
6 * All Rights Reserved.
7 *
8 * The contents of this file, and the files included with this file,
9 * are subject to the current version of the Real Format Source Code
10 * Porting and Optimization License, available at
11 * https://helixcommunity.org/2005/license/realformatsource (unless
12 * RealNetworks otherwise expressly agrees in writing that you are
13 * subject to a different license). You may also obtain the license
14 * terms directly from RealNetworks. You may not use this file except
15 * in compliance with the Real Format Source Code Porting and
16 * Optimization License. There are no redistribution rights for the
17 * source code of this file. Please see the Real Format Source Code
18 * Porting and Optimization License for the rights, obligations and
19 * limitations governing use of the contents of the file.
20 *
21 * RealNetworks is the developer of the Original Code and owns the
22 * copyrights in the portions it created.
23 *
24 * This file, and the files included with this file, is distributed and
25 * made available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND,
26 * EITHER EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS ALL
27 * SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF
28 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT
29 * OR NON-INFRINGEMENT.
30 *
31 * Technology Compatibility Kit Test Suite(s) Location:
32 * https://rarvcode-tck.helixcommunity.org
33 *
34 * Contributor(s):
35 *
36 * ***** END LICENSE BLOCK ***** */
37
38#ifndef HELIX_RESULT_H
39#define HELIX_RESULT_H
40
41#include "helix_types.h"
42
43#ifdef __cplusplus
44extern "C" {
45#endif /* #ifdef __cplusplus */
46
47 /* Definition of HX_RESULT */
48#ifndef HX_RESULT
49 typedef INT32 HX_RESULT;
50#endif /* #ifndef HX_RESULT */
51
52 /* FACILITY_ITF defintion */
53#ifndef FACILITY_ITF
54#define FACILITY_ITF 4
55#endif
56
57 /* General error definition macro */
58#ifndef MAKE_HX_FACILITY_RESULT
59#define MAKE_HX_FACILITY_RESULT(sev,fac,code) \
60 ((HX_RESULT) (((UINT32)(sev) << 31) | ((UINT32)(fac)<<16) | ((UINT32)(code))))
61#endif /* #ifndef MAKE_HX_FACILITY_RESULT */
62
63 /* Error definition macros with fac == FACILITY_ITF */
64#ifndef MAKE_HX_RESULT
65#define MAKE_HX_RESULT(sev,fac,code) MAKE_HX_FACILITY_RESULT(sev, FACILITY_ITF, ((fac << 6) | (code)))
66#endif /* #ifndef MAKE_HX_RESULT */
67
68#define SS_GLO 0 /* General errors */
69#define SS_NET 1 /* Networking errors */
70#define SS_FIL 2 /* File errors */
71#define SS_DEC 8 /* Decoder errors */
72#define SS_DPR 63 /* Deprecated errors */
73
74#define HXR_NOTIMPL MAKE_HX_FACILITY_RESULT(1,0,0x4001) /* 80004001 */
75#define HXR_OUTOFMEMORY MAKE_HX_FACILITY_RESULT(1,7,0x000e) /* 8007000e */
76#define HXR_INVALID_PARAMETER MAKE_HX_FACILITY_RESULT(1,7,0x0057) /* 80070057 */
77#define HXR_NOINTERFACE MAKE_HX_FACILITY_RESULT(1,0,0x4002) /* 80004002 */
78#define HXR_POINTER MAKE_HX_FACILITY_RESULT(1,0,0x4003) /* 80004003 */
79#define HXR_FAIL MAKE_HX_FACILITY_RESULT(1,0,0x4005) /* 80004005 */
80#define HXR_ACCESSDENIED MAKE_HX_FACILITY_RESULT(1,7,0x0005) /* 80070005 */
81#define HXR_OK MAKE_HX_FACILITY_RESULT(0,0,0) /* 00000000 */
82
83#define HXR_INVALID_VERSION MAKE_HX_RESULT(1,SS_GLO,5) /* 80040005 */
84#define HXR_UNEXPECTED MAKE_HX_RESULT(1,SS_GLO,9) /* 80040009 */
85#define HXR_UNSUPPORTED_AUDIO MAKE_HX_RESULT(1,SS_GLO,15) /* 8004000f */
86#define HXR_NOT_SUPPORTED MAKE_HX_RESULT(1,SS_GLO,33) /* 80040021 */
87
88#define HXR_NO_DATA MAKE_HX_RESULT(0,SS_NET,2) /* 00040042 */
89
90#define HXR_AT_END MAKE_HX_RESULT(0,SS_FIL,0) /* 00040080 */
91#define HXR_INVALID_FILE MAKE_HX_RESULT(1,SS_FIL,1) /* 80040081 */
92#define HXR_CORRUPT_FILE MAKE_HX_RESULT(1,SS_FIL,17) /* 80040091 */
93#define HXR_READ_ERROR MAKE_HX_RESULT(1,SS_FIL,18) /* 80040092 */
94
95#define HXR_BAD_FORMAT MAKE_HX_RESULT(1,SS_DPR,1) /* 80040fc1 */
96
97#define HXR_DEC_NOT_FOUND MAKE_HX_RESULT(1,SS_DEC,1) /* 80040201 */
98
99 /* Define success and failure macros */
100#define HX_SUCCEEDED(status) (((UINT32) (status) >> 31) == 0)
101#define HX_FAILED(status) (((UINT32) (status) >> 31) != 0)
102
103#ifdef __cplusplus
104}
105#endif /* #ifdef __cplusplus */
106
107#endif /* #ifndef HELIX_RESULT_H */
108