Browse CVS Repository
Diff of /xoonips/AL/event.cc
Parent Directory
| Revision Log
| Revision Graph
| Patch
| 32 |
|
|
| 33 |
const int event::validFields[][10] = |
const int event::validFields[][10] = |
| 34 |
{ |
{ |
| 35 |
// timestamp, exec_uid, remote_host, index_id, file_id, uid, gid, search_keyword, login_name |
// timestamp, exec_uid, remote_host, index_id, file_id, uid, gid, search_keyword, additional_info |
| 36 |
{ 0,0,0,0,0,0,0,0,0,0}, //(dummy) |
{ 0,0,0,0,0,0,0,0,0,0}, //(dummy) |
| 37 |
{ 1,1,1,0,0,0,0,0,0,1}, //LOGIN_FAILURE |
{ 1,1,1,0,0,0,0,0,0,1}, //LOGIN_FAILURE |
| 38 |
{ 1,1,1,0,0,0,0,0,0,0}, //LOGIN_SUCCESS |
{ 1,1,1,0,0,0,0,0,0,0}, //LOGIN_SUCCESS |
| 48 |
{ 1,1,1,1,0,0,0,0,0,0}, //DELETE_INDEX |
{ 1,1,1,1,0,0,0,0,0,0}, //DELETE_INDEX |
| 49 |
{ 1,1,1,1,1,0,0,0,0,0}, //CERTIFY_ITEM |
{ 1,1,1,1,1,0,0,0,0,0}, //CERTIFY_ITEM |
| 50 |
{ 1,1,1,1,1,0,0,0,0,0}, //REJECT_ITEM |
{ 1,1,1,1,1,0,0,0,0,0}, //REJECT_ITEM |
| 51 |
{ 1,1,1,0,0,0,1,0,0,0}, //REQUEST_INSERT_ACCOUNT |
{ 1,0,1,0,0,0,1,0,0,0}, //REQUEST_INSERT_ACCOUNT |
| 52 |
{ 1,1,1,0,0,0,1,0,0,0}, //CERTIFY_ACCOUNT |
{ 1,1,1,0,0,0,1,0,0,0}, //CERTIFY_ACCOUNT |
| 53 |
{ 1,1,1,0,0,0,0,1,0,0}, //INSERT_GROUP |
{ 1,1,1,0,0,0,0,1,0,0}, //INSERT_GROUP |
| 54 |
{ 1,1,1,0,0,0,0,1,0,0}, //UPDATE_GROUP |
{ 1,1,1,0,0,0,0,1,0,0}, //UPDATE_GROUP |
| 73 |
gid = 0; |
gid = 0; |
| 74 |
remoteHost = 0; setValue( &this -> remoteHost , "" ); |
remoteHost = 0; setValue( &this -> remoteHost , "" ); |
| 75 |
searchKeyword = 0; setValue( &this -> searchKeyword , "" ); |
searchKeyword = 0; setValue( &this -> searchKeyword , "" ); |
| 76 |
loginName = 0; setValue( &this -> loginName , "" ); |
additionalInfo= 0; setValue( &this -> additionalInfo, "" ); |
| 77 |
} |
} |
| 78 |
|
|
| 79 |
event::~event(){ |
event::~event(){ |
| 80 |
if ( remoteHost != 0 ) delete[] remoteHost ; |
if ( remoteHost != 0 ) delete[] remoteHost ; |
| 81 |
if ( searchKeyword != 0 ) delete[] searchKeyword ; |
if ( searchKeyword != 0 ) delete[] searchKeyword ; |
| 82 |
if ( loginName != 0 ) delete[] loginName ; |
if ( additionalInfo!= 0 ) delete[] additionalInfo; |
| 83 |
|
|
| 84 |
} |
} |
| 85 |
|
|
| 94 |
groupid_t event::getGID () const { return gid ; } |
groupid_t event::getGID () const { return gid ; } |
| 95 |
const char* event::getRemoteHost () const { return remoteHost ; } |
const char* event::getRemoteHost () const { return remoteHost ; } |
| 96 |
const char* event::getSearchKeyword () const { return searchKeyword ; } |
const char* event::getSearchKeyword () const { return searchKeyword ; } |
| 97 |
const char* event::getLoginName () const { return loginName ; } |
const char* event::getAdditionalInfo() const { return additionalInfo; } |
| 98 |
|
|
| 99 |
void event::setEventID ( eventid_t x ) { if ( ETID_INVALID_ETID < x && x <= ETID_MAX ) eventID = x; } |
void event::setEventID ( eventid_t x ) { if ( ETID_INVALID_ETID < x && x <= ETID_MAX ) eventID = x; } |
| 100 |
void event::setEventTypeID ( eventtypeid_t x ) { eventTypeID = x; } |
void event::setEventTypeID ( eventtypeid_t x ) { eventTypeID = x; } |
| 101 |
void event::setTimestamp ( time_t x ) { timestamp = x; } |
void event::setTimestamp ( time_t x ) { timestamp = x; } |
| 102 |
void event::setExecUID ( userid_t x ) { execUID = x; } |
void event::setExecUID ( userid_t x ) { execUID = x; } |
| 103 |
void event::setIndexID ( indexid_t x ) { indexID = x; } |
void event::setIndexID ( indexid_t x ) { indexID = x; } |
| 104 |
void event::setItemID ( itemid_t x ) { itemID = x; } |
void event::setItemID ( itemid_t x ) { itemID = x; } |
| 105 |
void event::setFileID ( fileid_t x ) { fileID = x; } |
void event::setFileID ( fileid_t x ) { fileID = x; } |
| 106 |
void event::setUID ( userid_t x ) { uid = x; } |
void event::setUID ( userid_t x ) { uid = x; } |
| 107 |
void event::setGID ( groupid_t x ) { gid = x; } |
void event::setGID ( groupid_t x ) { gid = x; } |
| 108 |
void event::setRemoteHost ( const char* x ) { setValue( &this -> remoteHost , x ); } |
void event::setRemoteHost ( const char* x ) { setValue( &this -> remoteHost , x ); } |
| 109 |
void event::setSearchKeyword( const char* x ) { setValue( &this -> searchKeyword , x ); } |
void event::setSearchKeyword ( const char* x ) { setValue( &this -> searchKeyword , x ); } |
| 110 |
void event::setLoginName ( const char* x ) { setValue( &this -> loginName , x ); } |
void event::setAdditionalInfo( const char* x ) { setValue( &this -> additionalInfo, x ); } |
| 111 |
|
|
| 112 |
bool event::isValidTimestamp () const { return (bool)validFields[eventTypeID][0]; } |
bool event::isValidTimestamp () const { return (bool)validFields[eventTypeID][0]; } |
| 113 |
bool event::isValidExecUID () const { return (bool)validFields[eventTypeID][1]; } |
bool event::isValidExecUID () const { return (bool)validFields[eventTypeID][1]; } |
| 114 |
bool event::isValidIndexID () const { return (bool)validFields[eventTypeID][3]; } |
bool event::isValidIndexID () const { return (bool)validFields[eventTypeID][3]; } |
| 115 |
bool event::isValidItemID () const { return (bool)validFields[eventTypeID][4]; } |
bool event::isValidItemID () const { return (bool)validFields[eventTypeID][4]; } |
| 116 |
bool event::isValidFileID () const { return (bool)validFields[eventTypeID][5]; } |
bool event::isValidFileID () const { return (bool)validFields[eventTypeID][5]; } |
| 117 |
bool event::isValidUID () const { return (bool)validFields[eventTypeID][6]; } |
bool event::isValidUID () const { return (bool)validFields[eventTypeID][6]; } |
| 118 |
bool event::isValidGID () const { return (bool)validFields[eventTypeID][7]; } |
bool event::isValidGID () const { return (bool)validFields[eventTypeID][7]; } |
| 119 |
bool event::isValidRemoteHost () const { return (bool)validFields[eventTypeID][2]; } |
bool event::isValidRemoteHost () const { return (bool)validFields[eventTypeID][2]; } |
| 120 |
bool event::isValidSearchKeyword() const { return (bool)validFields[eventTypeID][8]; } |
bool event::isValidSearchKeyword () const { return (bool)validFields[eventTypeID][8]; } |
| 121 |
bool event::isValidLoginName () const { return (bool)validFields[eventTypeID][9]; } |
bool event::isValidAdditionalInfo() const { return (bool)validFields[eventTypeID][9]; } |
| 122 |
|
|
|
|
Legend:
| Removed from v.1.1 |
|
| changed lines |
| |
Added in v.1.2 |
|
|
| |