• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* ------------------------------------------------------------------
2  * Copyright (C) 1998-2009 PacketVideo
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
13  * express or implied.
14  * See the License for the specific language governing permissions
15  * and limitations under the License.
16  * -------------------------------------------------------------------
17  */
18 // -*- c++ -*-
19 // = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
20 
21 //       O S C L _ T Y P E S   ( B A S I C   T Y P E D E F S )
22 
23 // = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
24 
25 /*! \addtogroup osclbase OSCL Base
26  *
27  * @{
28  */
29 
30 
31 /*! \file oscl_types.h
32  *  \brief This file contains basic type definitions for common use across platforms.
33  *
34  */
35 
36 #ifndef OSCL_TYPES_H_INCLUDED
37 #define OSCL_TYPES_H_INCLUDED
38 
39 
40 // include the config header for the platform
41 #ifndef OSCLCONFIG_H_INCLUDED
42 #include "osclconfig.h"
43 #endif
44 
45 //! The c_bool type is mapped to an integer to provide a bool type for C interfaces
46 typedef int c_bool;
47 
48 
49 //! The OsclAny is meant to be used the context of a generic pointer (i.e., no specific type).
50 typedef void OsclAny;
51 
52 //! mbchar is multi-byte char (e.g., UTF-8) with null termination.
53 typedef char mbchar;
54 
55 //! The uint type is a convenient abbreviation for unsigned int.
56 #if !defined(__USE_MISC)
57 // uint is defined in some Linux platform sys\types.h
58 typedef unsigned int uint;
59 #endif
60 
61 //! The octet type is meant to be used for referring to a byte or collection bytes without suggesting anything about the underlying meaning of the bytes.
62 typedef uint8 octet;
63 
64 //! The Float type defined as OsclFloat
65 typedef float OsclFloat;
66 
67 #ifndef OSCL_INT64_TYPES_DEFINED
68 //use native type
69 typedef OSCL_NATIVE_INT64_TYPE int64;
70 //use native type
71 typedef OSCL_NATIVE_UINT64_TYPE uint64;
72 #define OSCL_INT64_TYPES_DEFINED
73 #endif
74 
75 // define OSCL_WCHAR
76 typedef OSCL_NATIVE_WCHAR_TYPE oscl_wchar;
77 
78 //! define OSCL_TCHAR
79 typedef oscl_wchar OSCL_TCHAR;
80 
81 // The definition of the MemoryFragment will probably
82 // be OS-dependant since the goal is to allow this data
83 // structure to be passed directly to I/O routines that take
84 // scatter/gather arrays.
85 #if ( OSCL_MEMFRAG_PTR_BEFORE_LEN )
86 
87 struct OsclMemoryFragment
88 {
89     void *ptr;
90     uint32 len;
91 };
92 
93 #else
94 struct OsclMemoryFragment
95 {
96     uint32 len;
97     void *ptr;
98 };
99 #endif
100 
101 
102 /*! @} */
103 
104 
105 #endif  // OSCL_TYPES_H_INCLUDED
106