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 unsigned int | recordCount () const |
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 () const |
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 75 of file pilotSerialDatabase.cc.
int PilotSerialDatabase::writeAppBlock | ( | unsigned char * | buffer, | |
int | len | |||
) | [virtual] |
Writes the application block info.
Implements PilotDatabase.
Definition at line 94 of file pilotSerialDatabase.cc.
unsigned int PilotSerialDatabase::recordCount | ( | ) | const [virtual] |
returns the number of records in the database, 0 if not open
Implements PilotDatabase.
Definition at line 106 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 122 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 149 of file pilotSerialDatabase.cc.
PilotRecord * PilotSerialDatabase::readRecordByIndex | ( | int | index | ) | [virtual] |
Reads a record from database, returns the record length.
Implements PilotDatabase.
Definition at line 174 of file pilotSerialDatabase.cc.
PilotRecord * PilotSerialDatabase::readNextRecInCategory | ( | int | category | ) | [virtual] |
Reads the next record from database in category 'category'.
Implements PilotDatabase.
Definition at line 200 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 219 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 240 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 272 of file pilotSerialDatabase.cc.
int PilotSerialDatabase::resetSyncFlags | ( | ) | [virtual] |
Resets all records in the database to not dirty.
Implements PilotDatabase.
Definition at line 285 of file pilotSerialDatabase.cc.
int PilotSerialDatabase::resetDBIndex | ( | ) | [virtual] |
Resets next record index to beginning.
Implements PilotDatabase.
Definition at line 297 of file pilotSerialDatabase.cc.
int PilotSerialDatabase::cleanup | ( | ) | [virtual] |
Purges all Archived/Deleted records from Palm Pilot database.
Implements PilotDatabase.
Definition at line 309 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 67 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 393 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 362 of file pilotSerialDatabase.cc.
int PilotSerialDatabase::getDBHandle | ( | ) | const [inline, protected] |
Returns the file handle used to communicate with the handheld.
This is an internal value to be passed to DLP functions.
Definition at line 115 of file pilotSerialDatabase.h.
The documentation for this class was generated from the following files: