kpilot/lib

PilotRecordBase Class Reference

#include <pilotRecord.h>

Inheritance diagram for PilotRecordBase:

PilotAddress PilotDateEntry PilotMemo PilotRecord PilotTodoEntry List of all members.

Detailed Description

All entries in the Handheld -- whether interpreted or binary blobs -- have some common characteristics, viz.

an ID number, a category, and some attributes defined by the handheld. PilotRecordBase is a common base class collecting methods to manipulate those common characteristics.

Definition at line 50 of file pilotRecord.h.


Public Member Functions

 PilotRecordBase (int attrib=0, int cat=0, recordid_t id=0)
 PilotRecordBase (const PilotRecordBase *b)
virtual ~PilotRecordBase ()
int attributes () const
void setAttributes (int attrib)
int category () const
void setCategory (int cat)
bool setCategory (const struct CategoryAppInfo *info, const QString &label)
recordid_t id () const
void setID (recordid_t id)
bool isDeleted () const
bool isSecret () const
bool isArchived () const
bool isModified () const
void setDeleted (bool d=true) SETTER(dlpRecAttrDeleted) inline void setSecret(bool d

Constructor & Destructor Documentation

PilotRecordBase::PilotRecordBase ( int  attrib = 0,
int  cat = 0,
recordid_t  id = 0 
) [inline]

Constructor.

Initialize the characteristics to the given values.

Parameters:
attrib Attributes (bitfield) for this entry.
cat Category for this entry. Should be in the range 0 <= cat < Pilot::CATEGORY_COUNT . Using an invalid category means 0 (unfiled) is used.
id Unique ID for this entry. May be 0 (non-unique) as well.

Definition at line 62 of file pilotRecord.h.

PilotRecordBase::PilotRecordBase ( const PilotRecordBase b  )  [inline]

Constructor.

Initializes the characteristics from the values the given record b has. When b is NULL (which is allowed), everything is assumed zero. No ownership is transferred.

Parameters:
b Record to take characteristics from.

Definition at line 75 of file pilotRecord.h.

virtual PilotRecordBase::~PilotRecordBase (  )  [inline, virtual]

Destructor.

Nothing to do for it.

Definition at line 87 of file pilotRecord.h.


Member Function Documentation

int PilotRecordBase::attributes (  )  const [inline]

Attributes of this record (deleted, secret, .

..); it's a bitfield.

Definition at line 92 of file pilotRecord.h.

void PilotRecordBase::setAttributes ( int  attrib  )  [inline]

Set the attributes of this record.

Definition at line 98 of file pilotRecord.h.

int PilotRecordBase::category (  )  const [inline]

Returns the category number [ 0 .

. Pilot::CATEGORY_COUNT-1] of this record.

Definition at line 106 of file pilotRecord.h.

void PilotRecordBase::setCategory ( int  cat  )  [inline]

Sets the category number [ 0 .

. Pilot::CATEGORY_COUNT-1] of this record. Trying to set an illegal category number files this one under "Unfiled" (which is 0).

Definition at line 116 of file pilotRecord.h.

bool PilotRecordBase::setCategory ( const struct CategoryAppInfo *  info,
const QString &  label 
) [inline]

Sets the category number by looking up the string label in the category table info .

Leaves the category unchanged if no match is found and returns false.

Parameters:
info AppInfo structure containing the labels (in handheld native encoding).
label The label to look for.
Returns:
true on success, false on failure

Definition at line 135 of file pilotRecord.h.

recordid_t PilotRecordBase::id (  )  const [inline]

Returns the record ID for this record.

Record IDs are unique for a given handheld and database.

Definition at line 157 of file pilotRecord.h.

void PilotRecordBase::setID ( recordid_t  id  )  [inline]

Sets the record ID for this record.

Use with caution -- you ca confuse the handheld by doing weird things here.

Definition at line 165 of file pilotRecord.h.

bool PilotRecordBase::isDeleted (  )  const [inline]

Accessor for one bit of the record's attributes.

Is this record marked deleted (on the handheld) ? Deleted records are not removed from the database until a HotSync is done (which normally calls purge deleted or so to really get rid of the records from storage.

Definition at line 175 of file pilotRecord.h.

bool PilotRecordBase::isSecret (  )  const [inline]

Accessor for one bit of the record's attributes.

Is this record secret? Secret records are not displayed on the desktop by default.

Definition at line 183 of file pilotRecord.h.

bool PilotRecordBase::isArchived (  )  const [inline]

Accessor for one bit of the record's attributes.

Is this record a to-be-archived record? When a record is deleted, it may be marked as "archive on PC" which means the PC should keep a copy. The PC data correspondng to an archived-but-deleted record must not be deleted.

Definition at line 194 of file pilotRecord.h.

bool PilotRecordBase::isModified (  )  const [inline]

Accessor for one bit of the record's attributes.

Is this record modified? Modified records are those that have been modified since the last HotSync.

Definition at line 202 of file pilotRecord.h.

void PilotRecordBase::setDeleted ( bool  d = true  )  [inline]

Mark a record as secret (or not).


The documentation for this class was generated from the following file:
KDE Home | KDE Accessibility Home | Description of Access Keys