source: libcf/trunk/include/cf_base.h@ 11

Last change on this file since 11 was 11, checked in by cheese, 11 years ago

#1 add logging module (working), fix some bug code and move NAME_LENGTH definition

File size: 678 bytes
Line 
1/**
2 * cf_base.h
3 */
4#ifndef __CF_BASE_H__
5#define __CF_BASE_H__
6
7typedef enum {
8 CF_FALSE = 0,
9 CF_TRUE = 1
10} E_CF_BOOL, CF_BOOL;
11
12#define CF_OK 0
13#define CF_ERROR -1
14
15#define NAME_LENGTH 128
16
17#define CF_ERROR_BASE CF_ERROR * 1000
18
19#define CF_ERROR_FILE CF_ERROR_BASE * 2
20#define CF_ERROR_SOCKET CF_ERROR_BASE * 3
21#define CF_ERROR_THREAD CF_ERROR_BASE * 4
22#define CF_ERROR_MUTEX CF_ERROR_BASE * 5
23#define CF_ERROR_DEBUG CF_ERROR_BASE * 6
24#define CF_ERROR_LOG CF_ERROR_BASE * 7
25
26#ifdef _WIN32
27# define CF_EXPORT __declspec(dllexport)
28#else // #ifdef _WIN32
29# define CF_EXPORT
30#endif // #ifdef _WIN32
31
32#endif // #ifndef __CF_BASE_H__
Note: See TracBrowser for help on using the repository browser.