Main Page | Class List | Directories | Class Members

O_ITable Class Reference

The OpenConnector implementation of MAPI's IMAPITable interface. More...

#include <O_ITable.h>

List of all members.

Public Member Functions

STDMETHODIMP GetLastError (HRESULT hResult, ULONG ulFlags, LPMAPIERROR *lppMAPIError)
 Documented in MAPI inteface documentation.
STDMETHODIMP Advise (ULONG ulEventMask, LPMAPIADVISESINK lpAdviseSink, ULONG *lpulConnection)
 Documented in MAPI inteface documentation.
STDMETHODIMP Unadvise (ULONG ulConnection)
 Documented in MAPI inteface documentation.
STDMETHODIMP GetStatus (ULONG *lpulTableStatus, ULONG *lpulTableType)
 Documented in MAPI inteface documentation.
STDMETHODIMP SetColumns (LPSPropTagArray lpPropTagArray, ULONG ulFlags)
 Documented in MAPI inteface documentation.
STDMETHODIMP QueryColumns (ULONG ulFlags, LPSPropTagArray *lpPropTagArray)
 Documented in MAPI inteface documentation.
STDMETHODIMP GetRowCount (ULONG ulFlags, ULONG *lpulCount)
 Documented in MAPI inteface documentation.
STDMETHODIMP SeekRow (BOOKMARK bkOrigin, LONG lRowCount, LONG *lplRowsSought)
 Documented in MAPI inteface documentation.
STDMETHODIMP SeekRowApprox (ULONG ulNumerator, ULONG ulDenominator)
 Documented in MAPI inteface documentation.
STDMETHODIMP QueryPosition (ULONG *lpulRow, ULONG *lpulNumerator, ULONG *lpulDenominator)
 Documented in MAPI inteface documentation.
STDMETHODIMP FindRow (LPSRestriction lpRestriction, BOOKMARK bkOrigin, ULONG ulFlags)
 Documented in MAPI inteface documentation.
STDMETHODIMP Restrict (LPSRestriction lpRestriction, ULONG ulFlags)
 Documented in MAPI inteface documentation.
STDMETHODIMP CreateBookmark (BOOKMARK *lpbkPosition)
 Documented in MAPI inteface documentation.
STDMETHODIMP FreeBookmark (BOOKMARK bkPosition)
 Documented in MAPI inteface documentation.
STDMETHODIMP SortTable (LPSSortOrderSet lpSortCriteria, ULONG ulFlags)
 Documented in MAPI inteface documentation.
STDMETHODIMP QuerySortOrder (LPSSortOrderSet *lppSortCriteria)
 Documented in MAPI inteface documentation.
STDMETHODIMP QueryRows (LONG lRowCount, ULONG ulFlags, LPSRowSet *lppRows)
 Documented in MAPI inteface documentation.
STDMETHODIMP Abort ()
 Documented in MAPI inteface documentation.
STDMETHODIMP ExpandRow (ULONG cbInstanceKey, LPBYTE pbInstanceKey, ULONG ulRowCount, ULONG ulFlags, LPSRowSet *lppRows, ULONG *lpulMoreRows)
 Documented in MAPI inteface documentation.
STDMETHODIMP CollapseRow (ULONG cbInstanceKey, LPBYTE pbInstanceKey, ULONG ulFlags, ULONG *lpulRowCount)
 Documented in MAPI inteface documentation.
STDMETHODIMP WaitForCompletion (ULONG ulFlags, ULONG ulTimeout, ULONG *lpulTableStatus)
 Documented in MAPI inteface documentation.
STDMETHODIMP GetCollapseState (ULONG ulFlags, ULONG cbInstanceKey, LPBYTE lpbInstanceKey, ULONG *lpcbCollapseState, LPBYTE *lppbCollapseState)
 Documented in MAPI inteface documentation.
STDMETHODIMP SetCollapseState (ULONG ulFlags, ULONG cbCollapseState, LPBYTE pbCollapseState, BOOKMARK *lpbkLocation)
 Documented in MAPI inteface documentation.
 O_ITable (void)
 The O_ITable Constructor.
 ~O_ITable (void)
 This function has not been developed yet.
void Destroy ()
 Destroy function resets an object.
HRESULT Create (char *df, LPSPropTagArray defaultTags, ULONG indexTag, MAPIUID ig, LPALLOCATEBUFFER lb, LPALLOCATEMORE lm, LPFREEBUFFER lf)
 Creates a new instance of the O_ITable class.
HRESULT Load (char *df, char *tableID, LPALLOCATEBUFFER lb, LPALLOCATEMORE lm, LPFREEBUFFER lf)
 Loads a previously created table into memory.
HRESULT Init (LPSPropTagArray defaultTags)
 Initialization function for the table class.
HRESULT Duplicate (O_ITable **tbl)
 Duplicate the table object.
STDMETHODIMP Dump (ULONG flag)
 Print the contents of this object to the screen.
STDMETHODIMP HrModifyRow (LPSRow lpSRow)
 Add or modify a table row in this object.
STDMETHODIMP HrDeleteRow (LPSPropValue lpSPropValue)
 Delete a table row in this object.
STDMETHODIMP HrGetView (LPSSortOrderSet lpSSortOrderSet, CALLERRELEASE *lpfCallerRelease, ULONG ulCallerData, LPMAPITABLE *lppMAPITable)
 Returns a 'view' object of the table.

Public Attributes

char * tableName
 The this object's SQL table name in the database.
char * objName
 Should not be included in the release build.


Detailed Description

The OpenConnector implementation of MAPI's IMAPITable interface.

O_ITable class is an implementation of the IMAPITable interface. Please see the MAPI interface documentation for information on IMAPITable methods. Here we only describe the features specific to the O_ITable class.


Constructor & Destructor Documentation

O_ITable::O_ITable void   ) 
 

The O_ITable Constructor.

Like most constructors in this project, the O_ITable constructor simply sets default properties. Object initialization is handled in the Create() method.

See also:
Create()


Member Function Documentation

HRESULT O_ITable::Create char *  df,
LPSPropTagArray  defaultTags,
ULONG  indexTag,
MAPIUID  ig,
LPALLOCATEBUFFER  lb,
LPALLOCATEMORE  lm,
LPFREEBUFFER  lf
 

Creates a new instance of the O_ITable class.

Create is called after the constructor to create a new instance of the O_ITable class. Any resources that are needed for the table are constructed at that time. Any MAPI initialization that is manatory is done here.

Parameters:
df The file path of the SQLite database.
defaultTags The column set of this table.
indexTag The column that will be the index value of the table.
ig A unique identifier for our table. A 128 bit number basically.
lb Memory allocator function.
lm Memory allocator function. Chains the allocated memory to parent.
lf Memory deallocator function.
See also:
Load(), Init()

void O_ITable::Destroy  ) 
 

Destroy function resets an object.

This function has not been developed yet. The goal is to have this function prepare and object for either destruction or reinitialization.

STDMETHODIMP O_ITable::Dump ULONG  flag  ) 
 

Print the contents of this object to the screen.

Dump uses the smlog library. This library multiplexes the text output to the debug output window and text files for example. The output is in XML format.

Parameters:
flag Misc flags. Eg. whether to print an XML root tag or not.

HRESULT O_ITable::Duplicate O_ITable **  tbl  ) 
 

Duplicate the table object.

This is done so that we can return a clone to a calling method that may deallocate the object that it receives.

STDMETHODIMP O_ITable::HrDeleteRow LPSPropValue  lpSPropValue  ) 
 

Delete a table row in this object.

Documented in the ITableData interface documentation in the MAPI manual. Simply deletes a row in an object. It finds the index row in the property list that it receives, and deletes the row with the corresponding index.

Parameters:
lpSPropValue Property set containing an index value.

STDMETHODIMP O_ITable::HrGetView LPSSortOrderSet  lpSSortOrderSet,
CALLERRELEASE *  lpfCallerRelease,
ULONG  ulCallerData,
LPMAPITABLE *  lppMAPITable
 

Returns a 'view' object of the table.

Documented in the ITableData interface documentation in the MAPI manual. Table view objects are very similar to table objects. The share the same Advice() code. They may be passed to functions that expect a reference to the 'main' table objeect.

STDMETHODIMP O_ITable::HrModifyRow LPSRow  lpSRow  ) 
 

Add or modify a table row in this object.

Documented in the ITableData interface documentation in the MAPI manual. If the row is found in this table, it is replaced. If it is not found, then it is added.

Parameters:
lpSRow The row to add/replace in the table

HRESULT O_ITable::Init LPSPropTagArray  defaultTags  ) 
 

Initialization function for the table class.

This function comprises of basically the actions that need to be done by both Create() and Load().

Parameters:
defaultTags List of columns in the loaded table.
See also:
Create(), Load()

HRESULT O_ITable::Load char *  df,
char *  tableID,
LPALLOCATEBUFFER  lb,
LPALLOCATEMORE  lm,
LPFREEBUFFER  lf
 

Loads a previously created table into memory.

This function loads an table object that was previously created using the Create() function. Create initializes and serializes a wide range of functions to disk in our database. Load assumes that the object had already been previously created and only loads the needed variables into memory. There either Create() or Load() is called after the table constructor, but NOT both

Parameters:
df The file path of the SQLite database.
tableID This is the table's name in the database. It comprises of the class type UID and object's UID.
lb Memory allocator function.
lm Memory allocator function. Chains the allocated memory to parent.
lf Memory deallocator function.
See also:
Create(), Init()


Member Data Documentation

char* O_ITable::tableName
 

The this object's SQL table name in the database.

This is name is basically 2 UID stitched together. The first UID is that of the type, ie. O_ITable class UID. The second is unique to each table object


The documentation for this class was generated from the following files:
Generated on Fri Aug 26 15:30:10 2005 for otlkcon by  doxygen 1.4.4