diff options
author | David Sommerseth <dazo@users.sourceforge.net> | 2013-04-12 21:40:50 +0200 |
---|---|---|
committer | David Sommerseth <dazo@users.sourceforge.net> | 2013-04-12 21:40:50 +0200 |
commit | 60800a7030c7aa3a9e1a1b6155abc4079a0e34f1 (patch) | |
tree | ad6f7f847d6dfe149d6bccd338b0d2ffa219c0f6 | |
parent | 5ad99fc1bf55e07171e5f175643378287667a181 (diff) | |
download | eurephia-60800a7030c7aa3a9e1a1b6155abc4079a0e34f1.tar.gz eurephia-60800a7030c7aa3a9e1a1b6155abc4079a0e34f1.tar.xz eurephia-60800a7030c7aa3a9e1a1b6155abc4079a0e34f1.zip |
Move the field mapping identifier from long int to long long
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
-rw-r--r-- | database/eurephiadb_mapping.h | 80 |
1 files changed, 42 insertions, 38 deletions
diff --git a/database/eurephiadb_mapping.h b/database/eurephiadb_mapping.h index 540ce3c..b6a6410 100644 --- a/database/eurephiadb_mapping.h +++ b/database/eurephiadb_mapping.h @@ -60,7 +60,7 @@ typedef struct _eDBfieldMap_s { int tableid; /**< @see TABLE_USERS */ char *table_alias; /**< If the table needs an alias in the SQL query, it should be set here*/ - long field_id; /**< @see FIELD_NONE */ + unsigned long long field_id; /**< @see FIELD_NONE */ eDBfieldType field_type; /**< Defines what kind of data this field stores */ eDBfieldFilterType filter_type; /**< Only for WHERE sections, defines what kind of filter mode to use */ @@ -97,42 +97,46 @@ extern const char *SESSION_STATUS[]; * fields can be processed in a bit-wise manner by some functions. * @{ */ -#define FIELD_NONE 0x0000000 /**< Special field */ -#define FIELD_RECID 0x0000001 /**< Special field, should be used to indicate primary key of the table */ -#define FIELD_UID 0x0000002 -#define FIELD_CERTID 0x0000004 -#define FIELD_UNAME 0x0000008 -#define FIELD_ACTIVATED 0x0000010 -#define FIELD_DEACTIVATED 0x0000020 -#define FIELD_LASTACCESS 0x0000040 - -#define FIELD_CERTDEPTH 0x0000080 -#define FIELD_CNAME 0x0000100 -#define FIELD_EMAIL 0x0000200 -#define FIELD_ORG 0x0000400 -#define FIELD_REGISTERED 0x0000800 - -#define FIELD_REMOTEIP 0x0001000 -#define FIELD_VPNIP 0x0002000 -#define FIELD_ATTEMPTS 0x0004000 -#define FIELD_LASTATTEMPT 0x0008000 - -#define FIELD_SESSTATUS 0x0010000 -#define FIELD_LOGIN 0x0020000 -#define FIELD_LOGOUT 0x0040000 -#define FIELD_PASSWD 0x0080000 -#define FIELD_CERTDIGEST 0x0100000 - -#define FIELD_ACCPROFILE 0x0200000 - -#define FIELD_INTERFACE 0x0400000 -#define FIELD_ACCESSLVL 0x0800000 - -#define FIELD_MACADDR 0x1000000 -#define FIELD_UICID 0x2000000 - -#define FIELD_DESCR 0x4000000 -#define FIELD_FWPROFILE 0x8000000 +#define FIELD_NONE 0x00000000LL /**< Special field */ +#define FIELD_RECID 0x00000001LL /**< Special field, should be used to indicate primary key of the table */ +#define FIELD_UID 0x00000002LL +#define FIELD_CERTID 0x00000004LL +#define FIELD_UNAME 0x00000008LL +#define FIELD_ACTIVATED 0x00000010LL +#define FIELD_DEACTIVATED 0x00000020LL +#define FIELD_LASTACCESS 0x00000040LL + +#define FIELD_CERTDEPTH 0x00000080LL +#define FIELD_CNAME 0x00000100LL +#define FIELD_EMAIL 0x00000200LL +#define FIELD_ORG 0x00000400LL +#define FIELD_REGISTERED 0x00000800LL + +#define FIELD_REMOTEIP 0x00001000LL +#define FIELD_VPNIP 0x00002000LL +#define FIELD_ATTEMPTS 0x00004000LL +#define FIELD_LASTATTEMPT 0x00008000LL + +#define FIELD_SESSTATUS 0x00010000LL +#define FIELD_LOGIN 0x00020000LL +#define FIELD_LOGOUT 0x00040000LL +#define FIELD_PASSWD 0x00080000LL +#define FIELD_CERTDIGEST 0x00100000LL + +#define FIELD_ACCPROFILE 0x00200000LL + +#define FIELD_INTERFACE 0x00400000LL +#define FIELD_ACCESSLVL 0x00800000LL + +#define FIELD_MACADDR 0x01000000LL +#define FIELD_UICID 0x02000000LL + +#define FIELD_DESCR 0x04000000LL +#define FIELD_FWPROFILE 0x08000000LL + +#define FIELD_TYPE 0x10000000LL +#define FIELD_FILE 0x20000000LL +#define FIELD_CONFIG 0x40000000LL /** * @} */ @@ -264,7 +268,7 @@ void eDBfreeMapping(eDBfieldMap *p); eDBfieldMap *eDBxmlMapping(eurephiaCTX *ctx, eDBfieldMap *dbmap, const char *tblalias, xmlNode *fmap_n); const char *eDBmkSortKeyString(eDBfieldMap *tfmap, const char *skeys_str); long int eDBmappingFieldsPresent(eDBfieldMap *map); -const char *eDBmappingGetValue(eDBfieldMap *map, long field_id); +const char *eDBmappingGetValue(eDBfieldMap *map, long long field_id); #endif // HAVE_LIBXML2 #endif // !EUREPHIADB_MAPPING_H |