#include <eventLog.h>
Inheritance diagram for eventLog:
Public Methods | |
eventLog (eventQuery *aEventQuery) | |
virtual | ~eventLog () |
size_t | getCount () const |
EventLog * | getElement (unsigned long aID) |
int | addElement (const EventLog &aElement, unsigned long aID) |
int | newElement (const EventLog &aElement, unsigned long &aID) |
int | addDefaultElement (unsigned long aID) |
int | removeElement (unsigned long aID) |
int | modifyElement (unsigned long aID, const EventLog &aElement) |
unsigned long | getNewId (void) |
int | setInteger32 (RMAttribute aName, unsigned long aID, long aValue) |
int | setUnsigned64 (RMAttribute aName, unsigned long aID, u_int64_t aValue) |
int | setUUIDString (RMAttribute aName, unsigned long aID, char *aUUIDStr) |
bool | elementIsReady (const EventLog &aElement) const |
int | getUnsigned64 (RMAttribute aName, unsigned long aID, u_int64_t &aValue) |
int | getUUIDString (RMAttribute aName, unsigned long aID, char *aUUIDStr) |
int | getUUID (RMAttribute aName, unsigned long aID, uuid_t aUUID) |
unsigned long | getMaxId (void) |
int | findExactId (unsigned long aID) |
int | init () |
initialization. More... | |
const EventLog * | getConstElement (unsigned long aID) |
get a element in const form. More... | |
int | findId (unsigned long aID) |
find a record with recid == aID. More... | |
int | getNextId (unsigned long aID, unsigned long &aNextID) |
find the record right after the record whose recid == aID. More... | |
int | getInteger32 (RMAttribute aName, unsigned long aID, long &aValue) |
get the value of int32 attribute of a event log record. More... | |
int | getUnsigned (RMAttribute aName, unsigned long aID, unsigned long &aValue) |
get the value of unsigned attribute of a event log record. More... | |
int | getString (RMAttribute aName, unsigned long aID, char *&aBuf) |
get the string attribute of an event log record. More... | |
int | getBinary (RMAttribute aName, unsigned long aID, char *&aBuf, unsigned long &aLength) |
get the binary attribute of an event log record. More... | |
int | setString (RMAttribute aName, unsigned long aID, char *aBuf) |
set the string value of an attribute. More... | |
int | setUnsigned (RMAttribute aName, unsigned long aID, unsigned long aValue) |
set the unsigned value of an attribute. More... | |
Private Methods | |
int | SearchAndReadLog (enum SearchOption aMethod, unsigned long aID, unsigned long &aNextID) |
search and read a record log based on aMethod and aID. More... | |
Private Attributes | |
string | mLogFilePath |
default log file path. More... | |
posix_logd_t | mLog |
the log file descriptor. More... | |
unsigned long | mDefaultQuery |
default query. More... | |
EventLog | mLastEntry |
last entry. More... | |
eventQuery * | mEventQuery |
Definition at line 38 of file eventLog.h.
|
Default constructor for eventLog. Definition at line 10 of file eventLog.cpp. References mDefaultQuery, mEventQuery, and mLogFilePath. |
|
Default destructor. Definition at line 22 of file eventLog.cpp. References mLog. |
|
Implements IBaseAccessor. Definition at line 63 of file eventLog.h. References RMCLIENT_ERROR_NOT_IMPLEMENTED. |
|
Definition at line 53 of file eventLog.h. References RMCLIENT_ERROR_NOT_IMPLEMENTED. |
|
Definition at line 98 of file eventLog.h. References RMCLIENT_ERROR_NOT_IMPLEMENTED. |
|
Implements IBaseAccessor. Definition at line 123 of file eventLog.h. References findId. |
|
find a record with recid == aID. Test if a particular record which recid == aID is in the log file or not.
Definition at line 91 of file eventLog.cpp. References FIND_ID, and SearchAndReadLog. Referenced by findExactId, and getConstElement. |
|
get the binary attribute of an event log record. Get the binary data of an event record.
Implements IBaseAccessor. Definition at line 302 of file eventLog.cpp. References EventLog::data, EventLog::entry, EVENTLOG_BINARY, getConstElement, RMAttribute, RMCLIENT_ERROR_LOG, RMCLIENT_ERROR_MEMORY, RMCLIENT_ERROR_NOSUCHNAME, and RMCLIENT_SUCCESS. |
|
get a element in const form. get an element in const form.
Definition at line 65 of file eventLog.cpp. References EventLog::entry, findId, and mLastEntry. Referenced by getBinary, getInteger32, getString, and getUnsigned. |
|
Implements IBaseAccessor. Definition at line 44 of file eventLog.h. References RMCLIENT_ERROR_NOT_IMPLEMENTED. |
|
Definition at line 49 of file eventLog.h. |
|
get the value of int32 attribute of a event log record. Get the integer value of an attribute.
Implements IBaseAccessor. Definition at line 121 of file eventLog.cpp. References EventLog::entry, EVENTLOG_FACILITY, EVENTLOG_FORMAT, EVENTLOG_SEVERITY, EVENTLOG_TYPE, getConstElement, RMAttribute, RMCLIENT_ERROR_LOG, RMCLIENT_ERROR_NOSUCHNAME, and RMCLIENT_SUCCESS. |
|
Definition at line 118 of file eventLog.h. References RMCLIENT_ERROR_NOT_IMPLEMENTED. |
|
Implements IBaseAccessor. Definition at line 78 of file eventLog.h. References RMCLIENT_ERROR_NOT_IMPLEMENTED. |
|
find the record right after the record whose recid == aID. Get the very next record whose recid == aID. If successful, the recid of the next record will be stored in aNextID.
Implements IBaseAccessor. Definition at line 109 of file eventLog.cpp. References FIND_NEXT_ID, and SearchAndReadLog. |
|
get the string attribute of an event log record. Get string value of the record.
Implements IBaseAccessor. Definition at line 226 of file eventLog.cpp. References EventLog::data, EventLog::entry, EVENTLOG_DEFAULTFILE, EVENTLOG_STRING, EVENTLOG_TIMESTAMP, getConstElement, mLogFilePath, RMAttribute, RMCLIENT_ERROR_LOG, RMCLIENT_ERROR_MEMORY, RMCLIENT_ERROR_NOSUCHNAME, and RMCLIENT_SUCCESS. |
|
get the value of unsigned attribute of a event log record. Get the unsigned value of an attribute.
Implements IBaseAccessor. Definition at line 164 of file eventLog.cpp. References EventLog::entry, EVENTLOG_DEFAULTQUERY, EVENTLOG_FLAG, EVENTLOG_GID, EVENTLOG_PGID, EVENTLOG_PID, EVENTLOG_PROCESSOR, EVENTLOG_SIZE, EVENTLOG_THREAD, EVENTLOG_UID, getConstElement, mDefaultQuery, RMAttribute, RMCLIENT_ERROR_LOG, RMCLIENT_ERROR_NOSUCHNAME, and RMCLIENT_SUCCESS. |
|
Implements IBaseAccessor. Definition at line 103 of file eventLog.h. References RMAttribute, and RMCLIENT_ERROR_NOT_IMPLEMENTED. |
|
Implements IBaseAccessor. Definition at line 113 of file eventLog.h. References RMAttribute, and RMCLIENT_ERROR_NOT_IMPLEMENTED. |
|
Implements IBaseAccessor. Definition at line 108 of file eventLog.h. References RMAttribute, and RMCLIENT_ERROR_NOT_IMPLEMENTED. |
|
initialization. Initializes the mLog by opening the event log file specified in mLogFilePath. If mLogFilePath is empty, then default system event log file should be opened.
Definition at line 38 of file eventLog.cpp. References mLog, mLogFilePath, RMCLIENT_ERROR_LOG_OPEN, and RMCLIENT_SUCCESS. Referenced by rmClient::init. |
|
Definition at line 73 of file eventLog.h. References RMCLIENT_ERROR_NOT_IMPLEMENTED. |
|
Definition at line 58 of file eventLog.h. References RMCLIENT_ERROR_NOT_IMPLEMENTED. |
|
Implements IBaseAccessor. Definition at line 68 of file eventLog.h. References RMCLIENT_ERROR_NOT_IMPLEMENTED. |
|
search and read a record log based on aMethod and aID. Search the event log and find the record and read the record into mLastEntry for later access. Definition at line 399 of file eventLog.cpp. References EventLog::data, EventLog::entry, FIND_ID, rmBaseArray< EventQuery >::getConstElement, mDefaultQuery, mEventQuery, mLastEntry, mLog, EventQuery::qstr, RMCLIENT_ERROR_LOG, RMCLIENT_ERROR_LOG_READ, RMCLIENT_ERROR_LOG_SEEK, RMCLIENT_ERROR_MEMORY, RMCLIENT_ERROR_QUERY, RMCLIENT_ERROR_QUERY_CREATE, RMCLIENT_SUCCESS, and SearchOption. |
|
Implements IBaseAccessor. Definition at line 83 of file eventLog.h. References RMAttribute, and RMCLIENT_ERROR_NOT_IMPLEMENTED. |
|
set the string value of an attribute. Set string of an attribute.
Implements IBaseAccessor. Definition at line 341 of file eventLog.cpp. References EVENTLOG_DEFAULTFILE, mLog, mLogFilePath, RMAttribute, RMCLIENT_ERROR_LOG_CLOSE, RMCLIENT_ERROR_LOG_OPEN, RMCLIENT_ERROR_NOSUCHNAME, and RMCLIENT_SUCCESS. |
|
set the unsigned value of an attribute. Set unsigned value of an attribute.
Implements IBaseAccessor. Definition at line 373 of file eventLog.cpp. References EVENTLOG_DEFAULTQUERY, EVENTQUERY, mDefaultQuery, RMAttribute, RMCLIENT_ERROR_NOSUCHNAME, RMCLIENT_ERROR_NOSUCHVALUE, and RMCLIENT_SUCCESS. |
|
Implements IBaseAccessor. Definition at line 88 of file eventLog.h. References RMAttribute, and RMCLIENT_ERROR_NOT_IMPLEMENTED. |
|
Implements IBaseAccessor. Definition at line 93 of file eventLog.h. References RMAttribute, and RMCLIENT_ERROR_NOT_IMPLEMENTED. |
|
default query.
Definition at line 170 of file eventLog.h. Referenced by eventLog, getUnsigned, SearchAndReadLog, and setUnsigned. |
|
Definition at line 175 of file eventLog.h. Referenced by eventLog, and SearchAndReadLog. |
|
last entry.
Definition at line 173 of file eventLog.h. Referenced by getConstElement, and SearchAndReadLog. |
|
the log file descriptor.
Definition at line 167 of file eventLog.h. Referenced by init, SearchAndReadLog, setString, and ~eventLog. |
|
default log file path.
Definition at line 164 of file eventLog.h. |