kpilot/lib
PilotDatabase Class Reference
#include <pilotDatabase.h>
Detailed Description
Methods to access a database on the pilot.NOTE: It is the users responsibility to delete PilotRecords returned by PilotDatabase methods when finished with them!!
Definition at line 71 of file pilotDatabase.h.
Public Types | |
enum | DBType { eNone = 0, eLocalDB = 1, eSerialDB = 2 } |
Public Member Functions | |
PilotDatabase (const QString &name=QString::null) | |
QString | name () const |
virtual bool | createDatabase (long creator=0, long type=0, int cardno=0, int flags=0, int version=0)=0 |
virtual int | deleteDatabase ()=0 |
virtual int | readAppBlock (unsigned char *buffer, int maxLen)=0 |
virtual int | writeAppBlock (unsigned char *buffer, int len)=0 |
virtual int | recordCount ()=0 |
virtual RecordIDList | idList () |
virtual RecordIDList | modifiedIDList () |
virtual PilotRecord * | readRecordById (recordid_t id)=0 |
virtual PilotRecord * | readRecordByIndex (int index)=0 |
virtual PilotRecord * | readNextRecInCategory (int category)=0 |
virtual PilotRecord * | readNextModifiedRec (int *ind=NULL)=0 |
virtual recordid_t | writeRecord (PilotRecord *newRecord)=0 |
virtual int | deleteRecord (recordid_t id, bool all=false)=0 |
virtual int | resetSyncFlags ()=0 |
virtual int | resetDBIndex ()=0 |
virtual int | cleanup ()=0 |
bool | isDBOpen () const |
virtual QString | dbPathName () const =0 |
virtual DBType | dbType () const =0 |
Static Public Member Functions | |
static int | count () |
static bool | isResource (struct DBInfo *info) |
Protected Member Functions | |
virtual void | openDatabase ()=0 |
virtual void | closeDatabase ()=0 |
void | setDBOpen (bool yesno) |
Member Enumeration Documentation
|
Use this instead of RTTI to determine the type of a PilotDatabase, for those cases where it's important.
Definition at line 173 of file pilotDatabase.h. |
Member Function Documentation
|
Purges all Archived/Deleted records from Palm Pilot database.
|
|
Debugging information: tally how many databases are created or destroyed. Returns the count of currently existing databases. Definition at line 69 of file pilotDatabase.cc. |
|
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. |
|
Returns some sensible human-readable identifier for the database. Serial databases get Pilot:, local databases return the full path. |
|
Deletes the database (by name, as given in the constructor, the database name is stored depending on the implementation of PilotLocalDatabase and PilotSerialDatabas).
|
|
Deletes a record with the given recordid_t from the database, or all records, if The recordid_t will be ignored in this case. Return value is negative on error, 0 otherwise. |
|
Returns a QValueList of all record ids in the database. This implementation is really bad. Definition at line 83 of file pilotDatabase.cc. |
|
Returns a list of all record ids that have been modified in the database. This implementation is really bad. Definition at line 98 of file pilotDatabase.cc. |
|
Reads the application block info, returns size.
|
|
Reads the next record from database that has the dirty flag set.
If |
|
Reads the next record from database in category 'category'.
|
|
Reads a record from database by id, returns record length.
|
|
Reads a record from database, returns the record length.
|
|
returns the number of records in the database
|
|
Resets next record index to beginning.
|
|
Resets all records in the database to not dirty.
|
|
Writes the application block info.
|
|
Writes a new record to database (if 'id' == 0, one will be assigned to newRecord).
|
The documentation for this class was generated from the following files: