Main Page | Class Hierarchy | Class List | Class Members

NamespaceAttributes Class Reference

List of all members.

Detailed Description

NamespaceAttributes contains the attributes of an IMAP4 namespace.

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()

NamespaceResponse

NAMESPACE command in RFC 2342

RFC 2342: IMAP4 Namespace


Public Member Functions

 NamespaceAttributes ()
 Default constructor.
 NamespaceAttributes (const char *prefix, char delimiter)
 Constructor that takes an initial value.
 NamespaceAttributes (const NamespaceAttributes &)
 Copy constructor.
 ~NamespaceAttributes ()
 Destructor.
NamespaceAttributesoperator= (const NamespaceAttributes &)
 Assignment operator.
const char * Prefix () const
 Gets the namespace prefix.
char Delimiter () const
 Gets the namespace delimiter.
void ImportData (ListItem *root)
 Called by the parser to set the data for this object.


Constructor & Destructor Documentation

NamespaceAttributes  ) 
 

Default constructor.

NamespaceAttributes const char *  prefix,
char  delimiter
 

Constructor that takes an initial value.

Parameters:
prefix initial value for the prefix attribute
delimiter intial value for the hierarchy delimiter attribute

NamespaceAttributes const NamespaceAttributes other  ) 
 

Copy constructor.

Parameters:
other other object to copy

~NamespaceAttributes  ) 
 

Destructor.


Member Function Documentation

char Delimiter  )  const
 

Gets the namespace delimiter.

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 "/".

Returns:
the value of the hierarchy delimiter attribute

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

NamespaceAttributes & operator= const NamespaceAttributes other  ) 
 

Assignment operator.

Parameters:
other other object to copy
Returns:
*this

const char * Prefix  )  const
 

Gets the namespace prefix.

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

If the prefix is empty, this member function returns an empty string.

Returns:
the value of the namespace prefix attribute

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