GDataStoreI Class Reference

#include <Store3.h>

Inheritance diagram for GDataStoreI:

GDataPropI GDom

List of all members.

Public Member Functions

virtual uint64 Size ()=0
virtual GDataICreate (int Type)=0
 Create a new data object that isn't written to disk yet.
virtual GDataFolderIGetRoot (bool create=false)=0
 Get the root folder object.
virtual Store3Status Move (GDataFolderI *NewFolder, GArray< GDataI * > &Items)=0
virtual Store3Status Delete (GArray< GDataI * > &Items, bool ToTrash)=0
virtual Store3Status Change (GArray< GDataI * > &Items, int PropId, GVariant &Value)=0
virtual bool Compact (GViewI *Parent, Progress *Prog, int Param=0)=0
 Compact the mail store.
virtual bool Upgrade (GViewI *Parent, Progress *Prog, GAutoString *Error=0)
virtual void OnEvent (void *Param)=0
 Called when event posted.
virtual bool OnIdle ()=0
virtual GDataEventsIGetEvents ()=0
 Gets the events interface.
virtual StoreTrans StartTransaction ()
 Start a scoped transaction.


Detailed Description

The virtual mail storage interface from which all mail stores inherit from.

The data store should implement GDataPropI::GetInt and handle these properties:

The data store may optionally implement GDataPropI::SetInt to handle this property:


Member Function Documentation

virtual Store3Status GDataStoreI::Change ( GArray< GDataI * > &  Items,
int  PropId,
GVariant Value 
) [pure virtual]

Changes items, which results in either the items properties being adjusted.

Success: The items properties are changed, and the GDataEventsI::OnChange callback is made.

Failure: Items are not changed. No callback is made.

Returns:
true on success.
Parameters:
Items  The object to change
PropId  The property to change...
Value  The value to assign (GV_INT32/64 -> SetInt, GV_DATETIME -> SetDateTime, GV_STRING -> SetStr)

virtual Store3Status GDataStoreI::Delete ( GArray< GDataI * > &  Items,
bool  ToTrash 
) [pure virtual]

Deletes items, which results in either the items being moved to the local trash folder or the items being completely deleted if there is no local trash. The items should all be in the same folder and of the same type.

Success: 'Items' are either owned by the local trash and not any previous folder, and GDataEventsI::OnMove is called. -or- 'Items' are completely deleted and removed from it's parent and GDataEventsI::OnDelete is called, after which the objects are freed.

Failure: 'Items' are owned by it's previous folder.

Returns:
true on success.
Parameters:
Items  The object to delete
ToTrash  Send to the trash or not...

virtual Store3Status GDataStoreI::Move ( GDataFolderI NewFolder,
GArray< GDataI * > &  Items 
) [pure virtual]

Move objects into a different folder.

Success: 'Items' are owned by 'NewFolder', and not any previous folder. Any GDataEventsI interface owned by the data store has it's 'OnMove' method called.

Failure: 'Item' is owned by it's previous folder.

Returns:
true on success.
Parameters:
NewFolder  The folder to move the object to
Items  The object to move

virtual bool GDataStoreI::OnIdle (  )  [pure virtual]

Called when the application is not receiving messages.

Returns:
false to wait for more messages.

virtual uint64 GDataStoreI::Size (  )  [pure virtual]

Returns:
size of object on disk

virtual bool GDataStoreI::Upgrade ( GViewI *  Parent,
Progress Prog,
GAutoString *  Error = 0 
) [inline, virtual]

Upgrades the mail store to the current version for this build. You should call this in response to getting DsUpgradeRequired back from this->GetInt(FIELD_STATUS).


The documentation for this class was generated from the following file:

Generated on Wed Dec 1 15:41:02 2010 for Lgi by  doxygen 1.5.7.1