Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Protected Member Functions | Protected Attributes
CGetStoreFoldersIter Class Reference
Inheritance diagram for CGetStoreFoldersIter:
Inheritance graph
Collaboration diagram for CGetStoreFoldersIter:
Collaboration graph

List of all members.

Public Member Functions

 CGetStoreFoldersIter (CMapiApi *pApi, CMapiFolderList &folders, int depth, BOOL isMail=TRUE)
virtual BOOL HandleHierarchyItem (ULONG oType, ULONG cb, LPENTRYID pEntry)

Protected Member Functions

BOOL ExcludeFolderClass (const PRUnichar *pName)

Protected Attributes

BOOL m_isMail
int m_depth

Detailed Description

Definition at line 284 of file MapiApi.cpp.

Constructor & Destructor Documentation

CGetStoreFoldersIter::CGetStoreFoldersIter ( CMapiApi pApi,
CMapiFolderList folders,
int  depth,
BOOL  isMail = TRUE 

Definition at line 299 of file MapiApi.cpp.

       m_pApi = pApi;
       m_pList = &folders;
       m_depth = depth;
       m_isMail = isMail;

Member Function Documentation

Definition at line 307 of file MapiApi.cpp.

       BOOL bResult;
    nsDependentString pNameStr(pName);
       if (m_isMail) {
              bResult = FALSE;
        if (pNameStr.EqualsLiteral("IPF.Appointment"))
                     bResult = TRUE;
              else if (pNameStr.EqualsLiteral("IPF.Contact"))
                     bResult = TRUE;
              else if (pNameStr.EqualsLiteral("IPF.Journal"))
                     bResult = TRUE;
        else if (pNameStr.EqualsLiteral("IPF.StickyNote"))
                     bResult = TRUE;
              else if (pNameStr.EqualsLiteral("IPF.Task"))
                     bResult = TRUE;
              // else if (!stricmp( pName, "IPF.Note"))
              //     bResult = TRUE;
       else {
              bResult = TRUE;
              if (pNameStr.EqualsLiteral("IPF.Contact"))
                     bResult = FALSE;

       return( bResult);

Here is the caller graph for this function:

BOOL CGetStoreFoldersIter::HandleHierarchyItem ( ULONG  oType,
ULONG  cb,
) [virtual]

Implements CMapiHierarchyIter.

Definition at line 335 of file MapiApi.cpp.

       if (oType == MAPI_FOLDER) {
              LPMAPIFOLDER pFolder;
              if (m_pApi->OpenEntry( cb, pEntry, (LPUNKNOWN *) &pFolder)) {
                     LPSPropValue         pVal;
                     nsString                    name;

                     pVal = m_pApi->GetMapiProperty( pFolder, PR_CONTAINER_CLASS);
                     if (pVal)
                            m_pApi->GetStringFromProp( pVal, name);

                     if ((name.IsEmpty() && m_isMail) || (!ExcludeFolderClass(name.get()))) {
                            pVal = m_pApi->GetMapiProperty( pFolder, PR_DISPLAY_NAME);
                            m_pApi->GetStringFromProp( pVal, name);
                            CMapiFolder   *pNewFolder = new CMapiFolder(name.get(), cb, pEntry, m_depth);
                            m_pList->AddItem( pNewFolder);
                            pVal = m_pApi->GetMapiProperty( pFolder, PR_FOLDER_TYPE);
                            MAPI_TRACE2( "Type: %d, name: %s\n", m_pApi->GetLongFromProp( pVal), (const char *)name);
                            // m_pApi->ListProperties( pFolder);
                            CGetStoreFoldersIter nextIter( m_pApi, *m_pList, m_depth + 1, m_isMail);
                            m_pApi->IterateHierarchy( &nextIter, pFolder);
              else {
                     MAPI_TRACE0( "GetStoreFolders - HandleHierarchyItem: Error opening folder entry.\n");
                     return( FALSE);
       else {
              MAPI_TRACE1( "GetStoreFolders - HandleHierarchyItem: Unhandled ObjectType: %ld\n", oType);

       return( TRUE);

Here is the call graph for this function:

Member Data Documentation

Definition at line 296 of file MapiApi.cpp.

Definition at line 293 of file MapiApi.cpp.

Definition at line 294 of file MapiApi.cpp.

Definition at line 295 of file MapiApi.cpp.

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