kpilot/lib
PilotSerialDatabase Class Reference
Inheritance diagram for PilotSerialDatabase:

Detailed Description
Definition at line 40 of file pilotSerialDatabase.h.
Public Member Functions | |
virtual | ~PilotSerialDatabase () |
virtual int | readAppBlock (unsigned char *buffer, int maxLen) |
virtual int | writeAppBlock (unsigned char *buffer, int len) |
virtual int | recordCount () |
virtual QValueList< recordid_t > | idList () |
virtual PilotRecord * | readRecordById (recordid_t id) |
virtual PilotRecord * | readRecordByIndex (int index) |
virtual PilotRecord * | readNextRecInCategory (int category) |
virtual PilotRecord * | readNextModifiedRec (int *ind=NULL) |
virtual recordid_t | writeRecord (PilotRecord *newRecordb) |
virtual int | deleteRecord (recordid_t id, bool all=false) |
virtual int | resetSyncFlags () |
virtual int | resetDBIndex () |
virtual int | cleanup () |
virtual QString | dbPathName () const |
virtual int | deleteDatabase () |
virtual bool | createDatabase (long creator=0, long type=0, int cardno=0, int flags=0, int version=0) |
QString | getDBName () |
virtual DBType | dbType () const |
Protected Member Functions | |
PilotSerialDatabase (KPilotDeviceLink *l, const QString &dbName) | |
virtual void | openDatabase () |
virtual void | closeDatabase () |
int | getDBHandle () |
Friends | |
class | KPilotDeviceLink |
Member Function Documentation
int PilotSerialDatabase::readAppBlock | ( | unsigned char * | buffer, | |
int | maxLen | |||
) | [virtual] |
Reads the application block info, returns size.
Implements PilotDatabase.
Definition at line 77 of file pilotSerialDatabase.cc.
int PilotSerialDatabase::writeAppBlock | ( | unsigned char * | buffer, | |
int | len | |||
) | [virtual] |
Writes the application block info.
Implements PilotDatabase.
Definition at line 96 of file pilotSerialDatabase.cc.
int PilotSerialDatabase::recordCount | ( | ) | [virtual] |
returns the number of records in the database
Implements PilotDatabase.
Definition at line 108 of file pilotSerialDatabase.cc.
QValueList< recordid_t > PilotSerialDatabase::idList | ( | ) | [virtual] |
Returns a QValueList of all record ids in the database.
Reimplemented from PilotDatabase.
Definition at line 121 of file pilotSerialDatabase.cc.
PilotRecord * PilotSerialDatabase::readRecordById | ( | recordid_t | id | ) | [virtual] |
Reads a record from database by id, returns record length.
Implements PilotDatabase.
Definition at line 148 of file pilotSerialDatabase.cc.
PilotRecord * PilotSerialDatabase::readRecordByIndex | ( | int | index | ) | [virtual] |
Reads a record from database, returns the record length.
Implements PilotDatabase.
Definition at line 173 of file pilotSerialDatabase.cc.
PilotRecord * PilotSerialDatabase::readNextRecInCategory | ( | int | category | ) | [virtual] |
Reads the next record from database in category 'category'.
Implements PilotDatabase.
Definition at line 199 of file pilotSerialDatabase.cc.
PilotRecord * PilotSerialDatabase::readNextModifiedRec | ( | int * | ind = NULL |
) | [virtual] |
Reads the next record from database that has the dirty flag set.
ind (if a valid pointer is given) will receive the index of the returned record.
Implements PilotDatabase.
Definition at line 218 of file pilotSerialDatabase.cc.
recordid_t PilotSerialDatabase::writeRecord | ( | PilotRecord * | newRecordb | ) | [virtual] |
Writes a new record to database (if 'id' == 0, one will be assigned to newRecord).
Implements PilotDatabase.
Definition at line 239 of file pilotSerialDatabase.cc.
int PilotSerialDatabase::deleteRecord | ( | recordid_t | id, | |
bool | all = false | |||
) | [virtual] |
Deletes a record with the given recordid_t from the database, or all records, if all is set to true.
The recordid_t will be ignored in this case. Return value is negative on error, 0 otherwise.
Implements PilotDatabase.
Definition at line 271 of file pilotSerialDatabase.cc.
int PilotSerialDatabase::resetSyncFlags | ( | ) | [virtual] |
Resets all records in the database to not dirty.
Implements PilotDatabase.
Definition at line 284 of file pilotSerialDatabase.cc.
int PilotSerialDatabase::resetDBIndex | ( | ) | [virtual] |
Resets next record index to beginning.
Implements PilotDatabase.
Definition at line 296 of file pilotSerialDatabase.cc.
int PilotSerialDatabase::cleanup | ( | ) | [virtual] |
Purges all Archived/Deleted records from Palm Pilot database.
Implements PilotDatabase.
Definition at line 308 of file pilotSerialDatabase.cc.
QString PilotSerialDatabase::dbPathName | ( | ) | const [virtual] |
Returns some sensible human-readable identifier for the database.
Serial databases get Pilot:, local databases return the full path.
Implements PilotDatabase.
Definition at line 69 of file pilotSerialDatabase.cc.
int PilotSerialDatabase::deleteDatabase | ( | ) | [virtual] |
Deletes the database (by name, as given in the constructor and stored in the fDBName field).
Implements PilotDatabase.
Definition at line 392 of file pilotSerialDatabase.cc.
bool PilotSerialDatabase::createDatabase | ( | long | creator = 0 , |
|
long | type = 0 , |
|||
int | cardno = 0 , |
|||
int | flags = 0 , |
|||
int | version = 0 | |||
) | [virtual] |
Creates the database with the given creator, type and flags on the given card (default is RAM).
If the database already exists, this function does nothing.
Implements PilotDatabase.
Definition at line 361 of file pilotSerialDatabase.cc.
The documentation for this class was generated from the following files: