Dacons LLP Mailit for C/C++ Version 1.0.8

Emai::ContactList Class Reference

EmaiContactList wrapper class.
ContactList is an object which simplifies operations with contacts (From, To, Cc etc) in message object. More...

#include <EmaiMessage.hpp>

Inheritance diagram for Emai::ContactList:

Emai::Object< EmaiContactList > List of all members.

Public Member Functions

 ContactList (EmaiOptions inOptions=EmaiNullOptions)
 ContactList (EmaiContactList inContactList, bool inAddRef)
 ContactList (const ContactList &inCopy)
ContactListoperator= (const ContactList &inCopy)
void AddContact (EmaiConstUniCharPtr inName, EmaiConstUniCharPtr inAddress, EmaiOptions inOptions=EmaiNullOptions)
 Adds a contact to the contact list.
EmaiUint32 GetCount (EmaiOptions inOptions=EmaiNullOptions)
 Retrieves the number of records in contact list.
EmaiConstUniCharPtr GetName (EmaiUint32 inIndex, EmaiOptions inOptions=EmaiNullOptions)
 Extracts friendly contact name from the contact list, at the specified index.
EmaiConstUniCharPtr GetAddress (EmaiUint32 inIndex, EmaiOptions inOptions=EmaiNullOptions)
 Extracts e-mail address from the contact list, at the specified index.

Detailed Description

EmaiContactList wrapper class.
ContactList is an object which simplifies operations with contacts (From, To, Cc etc) in message object.

See also:
EmaiContactList

Definition at line 82 of file EmaiMessage.hpp.


Member Function Documentation

void Emai::ContactList::AddContact ( EmaiConstUniCharPtr  inName,
EmaiConstUniCharPtr  inAddress,
EmaiOptions  inOptions = EmaiNullOptions 
) [inline]

Adds a contact to the contact list.

Parameters:
inName - friendly contact name.
The parameter inName can also be used to pass a combined value (name and address) in the format of "name" <address> to the plug-in. In this case the inAddress parameter should be empty.
inAddress - e-mail address of the contact
inOptions - not used in current version, use EmaiNullOptions
See also:
EmaiContactListAddContact

Definition at line 623 of file EmaiMessage.hpp.

References Emai::CheckErrorCode(), EmaiContactListAddContact(), and Emai::Object< EmaiContactList >::mObject.

Referenced by Emai::MessagePartEnumerator::ProcessContacts().

00628 {
00629     CheckErrorCode(EmaiContactListAddContact(mObject, inName, inAddress,
00630                             NULL, inOptions));
00631 }

EmaiUint32 Emai::ContactList::GetCount ( EmaiOptions  inOptions = EmaiNullOptions  )  [inline]

Retrieves the number of records in contact list.

Parameters:
inOptions - not used in current version, use EmaiNullOptions
Returns:
On successful exit contains number of the records in the list
See also:
EmaiContactListGetCount

Definition at line 634 of file EmaiMessage.hpp.

References Emai::CheckErrorCode(), EmaiContactListGetCount(), and Emai::Object< EmaiContactList >::mObject.

00637 {
00638     EmaiUint32 count = 0;
00639     CheckErrorCode(EmaiContactListGetCount(mObject, &count, inOptions));
00640     return count;
00641 }

EmaiConstUniCharPtr Emai::ContactList::GetName ( EmaiUint32  inIndex,
EmaiOptions  inOptions = EmaiNullOptions 
) [inline]

Extracts friendly contact name from the contact list, at the specified index.

Parameters:
inIndex - zero-based index of the contact in the list
inOptions - not used in current version, use EmaiNullOptions
Returns:
Zero-terminated unicode string which contains friendly contact name. The function returns NULL if invalid parameters are specified (i.e. inContactList is not valid list or inIndex is out of range)
See also:
EmaiContactListGetContactName

Definition at line 644 of file EmaiMessage.hpp.

References Emai::CheckErrorCode(), EmaiContactListGetContactName(), EmaiErrIncorrectParameter, and Emai::Object< EmaiContactList >::mObject.

00648 {
00649     EmaiConstUniCharPtr name = EmaiContactListGetContactName(mObject,
00650                                 inIndex, inOptions);
00651     if (name == NULL)
00652         CheckErrorCode(EmaiErrIncorrectParameter);
00653 
00654     return name;
00655 }

EmaiConstUniCharPtr Emai::ContactList::GetAddress ( EmaiUint32  inIndex,
EmaiOptions  inOptions = EmaiNullOptions 
) [inline]

Extracts e-mail address from the contact list, at the specified index.

Parameters:
inIndex - zero-based index of the contact in the list
inOptions - not used in current version, use EmaiNullOptions
Returns:
Zero-terminated unicode string which contains contact's e-mail address. The function returns NULL if invalid parameters are specified (i.e. inContactList is not valid list or inIndex is out of range)
See also:
EmaiContactListGetContactAddress

Definition at line 658 of file EmaiMessage.hpp.

References Emai::CheckErrorCode(), EmaiContactListGetContactAddress(), EmaiErrIncorrectParameter, and Emai::Object< EmaiContactList >::mObject.

00662 {
00663     EmaiConstUniCharPtr address = EmaiContactListGetContactAddress(mObject,
00664                                 inIndex, inOptions);
00665     if (address == NULL)
00666         CheckErrorCode(EmaiErrIncorrectParameter);
00667 
00668     return address;
00669 }


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