File: AGTypes.h

package info (click to toggle)
agsync 0.2-pre-9
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 2,044 kB
  • ctags: 1,183
  • sloc: ansic: 9,979; sh: 8,390; makefile: 86
file content (136 lines) | stat: -rw-r--r-- 3,229 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
/* The contents of this file are subject to the Mozilla Public License
 * Version 1.0 (the "License"); you may not use this file except in
 * compliance with the License. You may obtain a copy of the License at
 * http://www.mozilla.org/MPL/
 *
 * Software distributed under the License is distributed on an "AS IS"
 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
 * License for the specific language governing rights and limitations
 * under the License.
 *
 * The Original Code is Mobile Application Link.
 *
 * The Initial Developer of the Original Code is AvantGo, Inc.
 * Portions created by AvantGo, Inc. are Copyright (C) 1997-1999
 * AvantGo, Inc. All Rights Reserved.
 *
 * Contributor(s):
 */

#ifndef __AGTYPES_H__
#define __AGTYPES_H__


#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

enum {
    AG_ERROR_NOT_FOUND,
    AG_ERROR_BAD_ARGUMENT,
    AG_ERROR_READ_FAILED,
    AG_ERROR_WRITE_FAILED,
    AG_ERROR_SYNCHRONIZATION_FAILED,
    AG_ERROR_OUT_OF_MEMORY,
    AG_ERROR_PATH_UNKNOWN,
    AG_ERROR_UNKNOWN_DEVICE_TYPE,
    AG_ERROR_INVALID_SIGNATURE,
    AG_ERROR_UNKNOWN_VERSION,
    AG_ERROR_NOT_IMPLEMENTED,
    AG_ERROR_NONE = 0
};

#ifdef _WIN32
#define ExportFunc __declspec( dllexport )
#else
#define ExportFunc
#endif /* _WIN32 */

#ifdef _WIN32
#define ImportFunc __declspec(dllimport)
#else
#define ImportFunc
#endif

#ifndef __palmos__
/* Standard scalar types */

/* Certain other packages (such as Netscape's NSPR) define fixed-size integer
 * types.  To avoid redefining int8, int16, int32, uint8, uint16 and uint32,
 * we add a test for FIXED_INT_TYPES_DEFINED here and also to the header files of
 * other packages (such as NSPR) which we have to build with.
 * It would be better if each software package (including this one) added its own prefix to
 * these type names to avoid name collisions.
 */
#ifndef FIXED_INT_TYPES_DEFINED
#define FIXED_INT_TYPES_DEFINED

typedef signed char      int8;
typedef short            int16;
typedef int              int32;

#ifndef _CDGLOBAL_H_
/* The SSLPlus library defines these (but oddly enough not the int*
   typedefs)
*/
typedef unsigned char    uint8;
typedef unsigned short   uint16;
typedef unsigned int     uint32;
#endif /* _CDGLOBAL_H_ */

#endif /* FIXED_INT_TYPES_DEFINED */

typedef int 			 sword;
typedef unsigned int 	 uword;

typedef int AGBool;
#else /* __palmos__ */
/* Standard scalar types for __palmos__ */
#ifndef FIXED_INT_TYPES_DEFINED
#define FIXED_INT_TYPES_DEFINED
typedef signed char      int8;
typedef short            int16;
typedef long             int32;
 
#ifndef _CDGLOBAL_H_
/* The SSLPlus library defines these (but oddly enough not the int*
   typedefs)
*/
typedef unsigned char    uint8;
typedef unsigned short   uint16;
typedef unsigned long    uint32;
#endif /* _CDGLOBAL_H_ */

#endif /* FIXED_INT_TYPES_DEFINED */

typedef short 			 sword;
typedef unsigned short 	 uword;

typedef int AGBool;
#endif /* !__palmos__ */

#ifdef FALSE
#undef FALSE
#endif /* FALSE */

#define FALSE 0

#ifdef TRUE
#undef TRUE
#endif /* TRUE */

#define TRUE 1

#ifdef NULL
#undef NULL
#endif /* NULL */

#define NULL 0

#ifdef __cplusplus
}
#endif /* __cplusplus */


#endif /* __AGTYPES_H__ */