Main Page | Namespace List | Class Hierarchy | Class List | Namespace Members | Class Members

NamespaceResponse Class Reference

Inheritance diagram for NamespaceResponse:

Response List of all members.

Detailed Description

NamespaceResponse is a class that represents an IMAP4 NAMESPACE response.

IMAP4 servers may establish one or more namespaces for mailbox names. Examples of namespaces include a personal namespace, an other users' namespace, and a shared namespace. Namespaces may have different attribute values. If an IMAP4 server that supports the NAMESPACE option, it reports these attribute values in a NAMESPACE response when the client sends a NAMESPACE command. Two attributes are defined: the hierarchy delimiter and the prefix.

If the IMAP4 server allows hierarchical mailbox names, then the hierarchy delimiter is the character that separates the levels of the names. For example, a mailbox name might be "savedmail/2004/Q1", with the hierarchy delimiter "/".

The IMAP4 server may require a prefix for a namespace. An example is a prefix "~shared/" for shared mailboxes such as "~share/sales-team".

To get the attributes of an IMAP4 namespace, you may call the Imap4Client::Namespace() member function, then get the NamespaceResponse. From the NamespaceResponse, you may get the list NamespaceAttributes.

See also:
Imap4Client::Namespace()

NamespaceAttributes

NAMESPACE command in RFC 2342

RFC 2342: IMAP4 Namespace


Public Member Functions

 NamespaceResponse ()
 Default constructor.
 NamespaceResponse (const NamespaceResponse &other)
 Copy constructor.
virtual ~NamespaceResponse ()
 Destructor.
NamespaceResponseoperator= (const NamespaceResponse &other)
 Assignment operator.
unsigned NumPersonalNamespaces () const
 Gets the number of personal namespaces.
const NamespaceAttributesPersonalNamespaceAt (unsigned index) const
 Gets the specified personal namespace.
unsigned NumUserNamespaces () const
 Gets the number of user namespaces.
const NamespaceAttributesUserNamespaceAt (unsigned index) const
 Gets the specified user namespace.
unsigned NumSharedNamespaces () const
 Gets the number of shared namespaces.
const NamespaceAttributesSharedNamespaceAt (unsigned index) const
 Gets the specified shared namespace.
void ImportData (ListItem *root)
 Called by the parser to set the data for this object.


Constructor & Destructor Documentation

NamespaceResponse  ) 
 

Default constructor.

NamespaceResponse const NamespaceResponse other  ) 
 

Copy constructor.

Parameters:
other other object to copy

~NamespaceResponse  )  [virtual]
 

Destructor.


Member Function Documentation

void ImportData ListItem *  root  ) 
 

Called by the parser to set the data for this object.

Only the parser should call this function.

Parameters:
root root item of parse tree

unsigned NumPersonalNamespaces  )  const
 

Gets the number of personal namespaces.

Returns:
the number of personal namespaces

unsigned NumSharedNamespaces  )  const
 

Gets the number of shared namespaces.

Returns:
the number of shared namespaces

unsigned NumUserNamespaces  )  const
 

Gets the number of user namespaces.

Returns:
the number of user namespaces

NamespaceResponse & operator= const NamespaceResponse other  ) 
 

Assignment operator.

Parameters:
other other object to copy
Returns:
*this

const NamespaceAttributes & PersonalNamespaceAt unsigned  index  )  const
 

Gets the specified personal namespace.

You may use this member function and the NumPersonalNamespaces() member function to discover all the personal namespaces in the response.

The parameter index must satisfy the constraint index < NumPersonalNamespaces().

Parameters:
index position of the personal namespace attributes to get
Returns:
the attributes for the specified personal namespace

const NamespaceAttributes & SharedNamespaceAt unsigned  index  )  const
 

Gets the specified shared namespace.

You may use this member function and the NumSharedNamespaces() member function to discover all the shared namespaces in the response.

The parameter index must satisfy the constraint index < NumSharedNamespaces().

Parameters:
index position of the shared namespace attributes to get
Returns:
the attributes for the specified shared namespace

const NamespaceAttributes & UserNamespaceAt unsigned  index  )  const
 

Gets the specified user namespace.

You may use this member function and the NumUserNamespaces() member function to discover all the user namespaces in the response.

The parameter index must satisfy the constraint index < NumUserNamespaces().

Parameters:
index position of the user namespace attributes to get
Returns:
the attributes for the specified user namespace

Copyright © 2001-2005 Hunny Software, Inc. All rights reserved.