blob: 0a3da304dcb471979d7b054f6ddc07f9fae593d0 [file] [log] [blame]
The Android Open Source Project30957f52008-10-21 07:00:00 -07001/*
2 * Copyright (C) 2008 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef btk_TYPES_EM_H
18#define btk_TYPES_EM_H
19
20/**
21 * This file contains general purpose types.
22 */
23
24/* ---- includes ----------------------------------------------------------- */
25
26/* ---- related objects --------------------------------------------------- */
27
28/* ---- typedefs ----------------------------------------------------------- */
29
30/** elementary data types */
31
32/** integer data formats */
33typedef signed short s16;
34typedef unsigned short u16;
35
36#if defined HW_TMS320C6x
37
38 typedef signed int s32;
39 typedef unsigned int u32;
40
41#elif defined HW_TMS320C5x
42
43 typedef signed long s32;
44 typedef unsigned long u32;
45
46#else
47
48 typedef signed int s32;
49 typedef unsigned int u32;
50
51#endif
52
53/** signed 16.16 fixed point format */
54typedef s32 s16p16;
55
56/** signed 8.24 fixed point format */
57typedef s32 s8p24;
58
59/** function return status */
60typedef enum
61{
62 /** execution finished without error */
63 btk_STATUS_OK,
64
65 /** execution could not continue because the object handle was invalid */
66 btk_STATUS_INVALID_HANDLE,
67
68 /** execution could not continue because of a preexisting unhandled error condition */
69 btk_STATUS_PREEXISTING_ERROR,
70
71 /** execution caused a new error condition */
72 btk_STATUS_ERROR
73
74} btk_Status;
75
76
77/** gallery type */
78typedef enum
79{
80 /** album gallery */
81 btk_GALLERY_ALBUM,
82
83 /** reference gallery */
84 btk_GALLERY_REFERENCE
85
86} btk_GalleryType;
87
88/** database arrangement type */
89typedef enum
90{
91 /** database entries are arranged in one coherent memory block without spaces */
92 btk_COHERENT,
93
94 /** database entries are arbitrarily distributed in memory and are referenced through pointers */
95 btk_DISTRIBUTED
96
97} btk_DataArrangement;
98
99
100/** error types */
101typedef enum
102{
103 /** execution finished without error */
104 btk_ERR_NO_ERROR, /* no error */
105 btk_ERR_INTERNAL, /* internal error */
106 btk_ERR_MEMORY, /* failure to allocate memory */
107 btk_ERR_VERSION, /* version conflict (software version is older than parameter version) */
108 btk_ERR_CORRUPT_DATA /* corrup parameter data or corrupt internal structure */
109
110} btk_Error;
111
112/** the following definitions are used to specify dll handling */
113#if ( defined WIN32 || defined _WIN32_WCE || defined __SYMBIAN32__ ) && !defined btk_NO_DLL
114 #ifdef btk_EXPORTING
115 #define btk_DECLSPEC __declspec(dllexport)
116 #else
117 #define btk_DECLSPEC __declspec(dllimport)
118 #endif
119#else
120 #define btk_DECLSPEC
121#endif
122
123/* ---- constants ---------------------------------------------------------- */
124
125/* ---- external functions ------------------------------------------------- */
126
127#endif /* btk_TYPES_EM_H */