Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Protected Attributes
nsIMAPNamespace Class Reference

#include <nsIMAPNamespace.h>

List of all members.

Public Member Functions

 nsIMAPNamespace (EIMAPNamespaceType type, const char *prefix, char delimiter, PRBool from_prefs)
 ~nsIMAPNamespace ()
EIMAPNamespaceType GetType ()
const char * GetPrefix ()
char GetDelimiter ()
void SetDelimiter (char delimiter, PRBool delimiterFilledIn)
PRBool GetIsDelimiterFilledIn ()
PRBool GetIsNamespaceFromPrefs ()
int MailboxMatchesNamespace (const char *boxname)

Protected Attributes

EIMAPNamespaceType m_namespaceType
char * m_prefix
char m_delimiter
PRBool m_fromPrefs
PRBool m_delimiterFilledIn

Detailed Description

Definition at line 41 of file nsIMAPNamespace.h.


Constructor & Destructor Documentation

nsIMAPNamespace::nsIMAPNamespace ( EIMAPNamespaceType  type,
const char *  prefix,
char  delimiter,
PRBool  from_prefs 
)

Definition at line 51 of file nsIMAPNamespace.cpp.

{
       m_namespaceType = type;
       m_prefix = PL_strdup(prefix);
       m_fromPrefs = from_prefs;

       m_delimiter = delimiter;
       m_delimiterFilledIn = !m_fromPrefs;       // if it's from the prefs, we can't be sure about the delimiter until we list it.
}

Definition at line 61 of file nsIMAPNamespace.cpp.


Member Function Documentation

char nsIMAPNamespace::GetDelimiter ( ) [inline]

Definition at line 51 of file nsIMAPNamespace.h.

{ return m_delimiter; }

Here is the caller graph for this function:

Definition at line 53 of file nsIMAPNamespace.h.

{ return m_delimiterFilledIn; }

Here is the caller graph for this function:

Definition at line 54 of file nsIMAPNamespace.h.

{ return m_fromPrefs; }

Here is the caller graph for this function:

const char* nsIMAPNamespace::GetPrefix ( ) [inline]

Definition at line 50 of file nsIMAPNamespace.h.

{ return m_prefix; }

Here is the caller graph for this function:

Definition at line 49 of file nsIMAPNamespace.h.

{ return m_namespaceType; }

Here is the caller graph for this function:

Definition at line 74 of file nsIMAPNamespace.cpp.

{
       if (!boxname) return -1;

       // If the namespace is part of the boxname
    if (!m_prefix || !*m_prefix)
        return 0;

       if (PL_strstr(boxname, m_prefix) == boxname)
              return PL_strlen(m_prefix);

       // If the boxname is part of the prefix
       // (Used for matching Personal mailbox with Personal/ namespace, etc.)
       if (PL_strstr(m_prefix, boxname) == m_prefix)
              return PL_strlen(boxname);
       return -1;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void nsIMAPNamespace::SetDelimiter ( char  delimiter,
PRBool  delimiterFilledIn 
)

Definition at line 66 of file nsIMAPNamespace.cpp.

{
  m_delimiter = delimiter;
  m_delimiterFilledIn = delimiterFilledIn;
}

Here is the caller graph for this function:


Member Data Documentation

char nsIMAPNamespace::m_delimiter [protected]

Definition at line 63 of file nsIMAPNamespace.h.

Definition at line 65 of file nsIMAPNamespace.h.

Definition at line 64 of file nsIMAPNamespace.h.

Definition at line 61 of file nsIMAPNamespace.h.

char* nsIMAPNamespace::m_prefix [protected]

Definition at line 62 of file nsIMAPNamespace.h.


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