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
19#ifndef M4V_H263_DECODER_PV_TYPES_H_
20#define M4V_H263_DECODER_PV_TYPES_H_
21
22#include <stdint.h>
23#include <string.h>
24#include <stdlib.h> // for free, malloc, etc
25
26// Redefine the int types
27typedef uint8_t uint8;
28typedef uint16_t uint16;
29typedef int16_t int16;
30typedef uint32_t uint32;
31typedef int32_t int32;
32typedef unsigned int uint;
33
34// Redefine the oscl memory management routines
35#define oscl_memcpy memcpy
36#define oscl_memset memset
37#define oscl_malloc malloc
38#define oscl_free free
39#define oscl_memcmp memcmp
40#define OSCL_DELETE(ptr) { delete(ptr); }
41
42// Request status values.  These are negative so that
43// they won't conflict with system error codes.
44const int32 OSCL_REQUEST_ERR_NONE = 0;
45const int32 OSCL_REQUEST_PENDING = (-0x7fffffff);
46const int32 OSCL_REQUEST_ERR_CANCEL = (-1);
47const int32 OSCL_REQUEST_ERR_GENERAL = (-2);
48
49// Request status type
50class OsclAOStatus
51{
52    public:
53        OsclAOStatus();
54        OsclAOStatus(int32 aStatus);
55        int32 operator=(int32 aStatus);
56        int32 operator==(int32 aStatus) const;
57        int32 operator!=(int32 aStatus) const;
58        int32 operator>=(int32 aStatus) const;
59        int32 operator<=(int32 aStatus) const;
60        int32 operator>(int32 aStatus) const;
61        int32 operator<(int32 aStatus) const;
62        int32 Value() const;
63    private:
64        int32 iStatus;
65};
66
67#endif  // M4V_H263_DECODER_PV_TYPES_H_
68