#include <ClientFolder.h>
Collaboration diagram for ClientFolder:
Public Member Functions | |
ClientFolder () | |
Constructor. | |
ClientFolder (ClientFolder &f) | |
Copy Constructor. | |
ClientFolder | operator= (ClientFolder &f) |
Operator =. | |
~ClientFolder () | |
Destructor. | |
void | setCOMPtr (MAPIFolderPtr &f, const std::wstring &type) |
Set a COM pointer to this object: refresh all members. | |
void | setCOMPtr (MAPIFolderPtr &f) |
Here itemType is derived from the defaultItemType of the folder. | |
MAPIFolderPtr & | getCOMPtr () |
Returns a reference to the internal COM pointer. | |
const std::wstring & | getID () |
const std::wstring & | getType () |
const std::wstring & | getName () |
const std::wstring & | getPath () |
const int | getSubfoldersCount () |
const int | getSubfoldersIndex () |
ClientFolder * | getFirstSubfolder () |
Returns the first subfolder of this folder. | |
ClientFolder * | getNextSubfolder () |
Returns the next subfolder of this folder. | |
ClientFolder * | getPreviousSubfolder () |
Returns the previous subfolder of this folder. | |
ClientFolder * | getLastSubfolder () |
Returns the last subfolder of this folder. | |
ClientFolder * | getSubfolder (const int index) |
Returns the subfolder from its index. | |
ClientFolder * | getSubfolderFromName (const std::wstring &subName) |
Returns the subfolder from its name. | |
ClientFolder * | addSubFolder (const std::wstring &subName, const std::wstring &type) |
Adds a new Subfolder for this folder, then a pointer is returned. | |
const int | getItemsCount () |
const int | getItemsIndex () |
ClientItem * | getFirstItem () |
Returns the first item of this folder. | |
ClientItem * | getNextItem () |
Returns the next item of this folder. | |
ClientItem * | getPreviousItem () |
Returns the previous item of this folder. | |
ClientItem * | getLastItem () |
Returns the last item of this folder. | |
ClientItem * | getItem (const int index) |
ClientItem * | addItem () |
Adds a new Item for this folder, then a pointer is returned. | |
Private Member Functions | |
ClientItem * | setInternalItem (IDispatchPtr &pItem) |
Set the appropriate internal item, based on the item type. | |
Private Attributes | |
std::wstring | ID |
The object entry-ID. | |
std::wstring | itemType |
The item-type of all items contained in the folder (contact/task/mail. | |
std::wstring | name |
std::wstring | path |
int | subfoldersCount |
Subfolders for this folder. | |
int | subfoldersIndex |
int | itemsCount |
Items inside folder. | |
int | itemsIndex |
MAPIFolderPtr | pFolder |
COM Pointers to microsoft outlook objects. | |
_FoldersPtr | pSubFolders |
MAPIFolderPtr | pSubFolder |
_ItemsPtr | pItems |
IDispatchPtr | pItem |
_ContactItemPtr | pContact |
_AppointmentItemPtr | pAppointment |
_MailItemPtr | pMail |
_NoteItemPtr | pNote |
_TaskItemPtr | pTask |
ClientFolder * | subFolder |
Internal Objects: 'get. | |
ClientMail * | |
ClientContact * | contact |
ClientAppointment * | appointment |
ClientTask * | task |
ClientNote * | note |
HRESULT | hr |
Result of COM pointers operations. |
Contains pointers of eventual items and folders inside this folder.
ClientItem * ClientFolder::setInternalItem | ( | IDispatchPtr & | pItem | ) | [private] |
Set the appropriate internal item, based on the item type.
If the internal item is NULL, it is created new. Then the item is linked with the COM pointer passed.
pItem | the generic Item COM pointer to link the item object <-- *** NOW class member / remove parameter... |
void ClientFolder::setCOMPtr | ( | MAPIFolderPtr & | f, | |
const std::wstring & | type | |||
) |
Set a COM pointer to this object: refresh all members.
This method is used to link the object to the correspondent outlook COM pointer. All class members are overwrited by this call. The method MUST be called before using this object, as the constructor doesn't link the class COM pointer. If 'type' parameter is an empty string, then item type is derived from the defaultItemType of the folder.
ClientFolder * ClientFolder::getFirstSubfolder | ( | ) |
Returns the first subfolder of this folder.
If subfolder not found returns NULL. In case of errors throws a ClientException.
ClientFolder * ClientFolder::getNextSubfolder | ( | ) |
Returns the next subfolder of this folder.
If subfolder not found returns NULL. In case of errors throws a ClientException.
ClientFolder * ClientFolder::getPreviousSubfolder | ( | ) |
Returns the previous subfolder of this folder.
If subfolder not found returns NULL. In case of errors throws a ClientException.
ClientFolder * ClientFolder::getLastSubfolder | ( | ) |
Returns the last subfolder of this folder.
If subfolder not found returns NULL. In case of errors throws a ClientException.
ClientFolder * ClientFolder::getSubfolder | ( | const int | index | ) |
Returns the subfolder from its index.
If subfolder not found returns NULL. In case of errors throws a ClientException.
ClientFolder * ClientFolder::getSubfolderFromName | ( | const std::wstring & | subName | ) |
Returns the subfolder from its name.
If subfolder not found returns NULL.
ClientFolder * ClientFolder::addSubFolder | ( | const std::wstring & | subName, | |
const std::wstring & | type | |||
) |
Adds a new Subfolder for this folder, then a pointer is returned.
'type' param is required because the subfolder could not be of the same type of the parent folder. In case of errors throws a ClientException.
ClientItem * ClientFolder::getFirstItem | ( | ) |
Returns the first item of this folder.
The pointer returned is a generic ClientItem, but it is casted from a specific Item based on the folder item type (contact / task / ...) If item not found returns NULL. In case of errors throws a ClientException.
ClientItem * ClientFolder::getNextItem | ( | ) |
Returns the next item of this folder.
The pointer returned is a generic ClientItem, but it is casted from a specific Item based on the folder item type (contact / task / ...) If item not found returns NULL. In case of errors throws a ClientException.
ClientItem * ClientFolder::getPreviousItem | ( | ) |
Returns the previous item of this folder.
The pointer returned is a generic ClientItem, but it is casted from a specific Item based on the folder item type (contact / task / ...) If item not found returns NULL. In case of errors throws a ClientException.
ClientItem * ClientFolder::getLastItem | ( | ) |
Returns the last item of this folder.
The pointer returned is a generic ClientItem, but it is casted from a specific Item based on the folder item type (contact / task / ...) If item not found returns NULL. In case of errors throws a ClientException.
ClientItem * ClientFolder::addItem | ( | ) |
Adds a new Item for this folder, then a pointer is returned.
The pointer returned is a generic ClientItem, but it is casted from a specific Item based on the folder item type (contact / task / ...) In case of errors throws a ClientException.
std::wstring ClientFolder::ID [private] |
The object entry-ID.
std::wstring ClientFolder::itemType [private] |
The item-type of all items contained in the folder (contact/task/mail.
..)
ClientFolder* ClientFolder::subFolder [private] |
Internal Objects: 'get.
..' methods always return references to these objects