Aspose::Email::Mapi::MapiPropertyContainer Class Reference

Represents the base class for MapiAttachment, MapiRecipient, MapiMessage. More...

Inherits Object.

Inherited by Aspose::Email::Mapi::MapiAttachment, Aspose::Email::Mapi::MapiMessageItemBase, Aspose::Email::Mapi::MapiNamedPropertyMappingStorage, Aspose::Email::Mapi::MapiPropertyStream, and Aspose::Email::Mapi::MapiRecipient.

Public Member Functions

virtual System::SharedPtr< MapiPropertyCollectionget_Properties ()
 Gets the collection of properties. More...
 
virtual int32_t get_CodePage ()
 Gets the code page. More...
 
System::SharedPtr< System::Text::Encoding > get_CurrentEncoding ()
 
 MapiPropertyContainer ()
 Initializes a new instance of the MapiPropertyContainer class. More...
 
 MapiPropertyContainer (System::SharedPtr< MapiPropertyCollection > properties)
 Initializes a new instance of the MapiPropertyContainer class. More...
 
virtual System::SharedPtr< MapiPropertyGetProperty (System::SharedPtr< PropertyDescriptor > pd)
 Gets MAPI property by property descriptor. More...
 
virtual void SetProperty (System::SharedPtr< PropertyDescriptor > pd, System::SharedPtr< System::Object > value)
 Sets MAPI property. More...
 
System::SharedPtr< MapiPropertyCollectionGetSubStorages ()
 
System::String TryGetPropertyString (int64_t tag, int32_t codepage)
 Try to get a property data as string with specified tag and code page. More...
 
System::ArrayPtr< uint8_t > TryGetPropertyData (int64_t tag)
 Try to get the property data with specified tag key. More...
 
System::String TryGetPropertyString (int64_t tag)
 Try to get a property data as string with specified tag. More...
 
System::String GetPropertyString (int64_t tag, int32_t codepage)
 Gets the string value of the property specified by tag. More...
 
System::String GetPropertyString (int64_t tag)
 Gets the string value of the property specified by tag. More...
 
System::ArrayPtr< uint8_t > GetPropertyBytes (int64_t tag)
 Gets the string value of the property specified by tag. More...
 
virtual void SetProperty (System::SharedPtr< MapiProperty > value)
 Sets the property. More...
 
System::Nullable< int32_t > GetPropertyInt32 (int64_t tag)
 Gets the int32 value of the property specified by tag. More...
 
System::Nullable< int64_t > GetPropertyLong (int64_t tag)
 Gets the value of the property specified by tag as Long (int64) type. More...
 
System::Nullable< int16_t > GetPropertyShort (int64_t tag)
 Gets the value of the property specified by tag as Short type. More...
 
System::Nullable< bool > GetPropertyBoolean (int64_t tag)
 Gets the value of the property specified by tag as Boolean type. More...
 
System::Nullable< System::DateTime > GetPropertyDateTime (int64_t key)
 Gets the value of the property specified by tag as DateTime type. More...
 
bool IsStoreUnicodeOk ()
 Determines if string properties are Unicode encoded or not. More...
 
bool TryGetPropertyString (int64_t tag, System::String &value, int32_t codepage)
 Gets the value of the specified property as String type. A return value indicates whether the operation succeeded. More...
 
bool TryGetPropertyString (int64_t tag, System::String &value)
 Gets the value of the specified property as String type. A return value indicates whether the operation succeeded. More...
 
bool TryGetPropertyDateTime (int64_t tag, System::DateTime &value)
 Gets the value of the specified property as DateTime type. A return value indicates whether the operation succeeded. More...
 
bool TryGetPropertyLong (int64_t tag, int64_t &value)
 Gets the value of the specified property as Long type. A return value indicates whether the operation succeeded. More...
 
bool TryGetPropertyInt32 (int64_t tag, int32_t &value)
 Gets the value of the specified property as Int32 type. A return value indicates whether the operation succeeded. More...
 
virtual System::SharedPtr< Nodes::IMapiNode > CreateMapiNode (System::String key)
 Creates the mapi node. More...
 
void SetProperty (int64_t tag, System::ArrayPtr< uint8_t > data)
 Set the property. More...
 
void SetProperty (int64_t tag, System::String value, OutlookMessageFormat format)
 Set the string property. More...
 
void SetProperty (int64_t tag, System::String value, bool isUnicode)
 Set the string property. More...
 
void SetProperty (int64_t tag, System::String value, System::SharedPtr< System::Text::Encoding > nonUnicodeEncoding)
 Set the string property. More...
 
void SetProperty (int64_t tag, System::String value)
 Set the string property with CurrentEncoding More...
 
void SetProperty (int64_t tag, System::DateTime dateTime)
 Set the datetime property. More...
 
void SetPropertyLong (int64_t tag, int64_t value)
 Set the long property. More...
 
virtual bool TryGetNamedProperty (System::SharedPtr< MapiProperty > mapiProperty, System::SharedPtr< MapiNamedProperty > &mapiNamedProperty)
 If MapiNamedPropertyMappingStorage is available, initializes and returns MapiNamedProperty, otherwise null. More...
 

Public Attributes

int32_t codePage
 The code page. More...
 
System::SharedPtr< MapiPropertyCollectionpropertyDictionary
 The property dictionary. More...
 

Static Public Attributes

static const int32_t DefaultCodePage
 

Friends

class Aspose::Email::MailMessage
 
class Aspose::Email::Attachment
 
class Aspose::Email::Tools::ContactConverter
 
class Aspose::Email::Clients::Exchange::Dav::ExchangeClient
 
class Aspose::Email::Mapi::MapiTask
 
class Aspose::Email::LinkedResource
 
class Aspose::Email::Mapi::FollowUpManager
 
class Aspose::Email::Mapi::MailMessageInterpretor
 
class Aspose::Email::Mapi::MapiAttachment
 
class Aspose::Email::Mapi::MapiAttachmentCollection
 
class Aspose::Email::Mapi::MapiAttachmentPropertyStream
 
class Aspose::Email::Mapi::MapiCalendar
 
class Aspose::Email::Mapi::MapiMessageItemBase
 
class Aspose::Email::Mapi::MapiCalendarExceptionInfo
 
class Aspose::Email::Mapi::MapiContact
 
class Aspose::Email::Mapi::MapiContactNamePropertySet
 
class Aspose::Email::Mapi::MapiContactOtherPropertySet
 
class Aspose::Email::Mapi::MapiContactPersonalInfoPropertySet
 
class Aspose::Email::Mapi::MapiContactPhoto
 
class Aspose::Email::Mapi::MapiDistributionList
 
class Aspose::Email::Mapi::MapiMessage
 
class Aspose::Email::Mapi::MapiMessagePropertyStream
 
class Aspose::Email::Mapi::MapiNamedPropertyMappingStorage
 
class Aspose::Email::Mapi::MapiNote
 
class Aspose::Email::Mapi::MapiObjectProperty
 
class Aspose::Email::Mapi::MapiRecipient
 
class Aspose::Email::Mapi::MapiRecipientPropertyStream
 
class Aspose::Email::Mapi::MapiTaskUsers
 
class Aspose::Email::Mapi::Nodes::AttachmentDirectory
 
class Aspose::Email::Mapi::Nodes::CustomObjectNode
 
class Aspose::Email::Mapi::Nodes::NamedPropertyMappingDirectory
 
class Aspose::Email::Mapi::Nodes::RecipientDirectory
 
class Aspose::Email::Mapi::OutlookUtil
 
class Aspose::Email::Storage::Pst::FolderInfo
 
class Aspose::Email::Storage::Pst::PstDoer
 
class Aspose::Email::Tnef::TnefAttachment
 
class Aspose::Email::Tools::ForwardMessageBuilder
 
class Aspose::Email::Tools::ResponseMessageBuilder
 
class Aspose::Email::Tools::ReplyMessageBuilder
 

Detailed Description

Represents the base class for MapiAttachment, MapiRecipient, MapiMessage.

Constructor & Destructor Documentation

◆ MapiPropertyContainer() [1/2]

Aspose::Email::Mapi::MapiPropertyContainer::MapiPropertyContainer ( )

Initializes a new instance of the MapiPropertyContainer class.

◆ MapiPropertyContainer() [2/2]

Aspose::Email::Mapi::MapiPropertyContainer::MapiPropertyContainer ( System::SharedPtr< MapiPropertyCollection properties)

Initializes a new instance of the MapiPropertyContainer class.

Parameters
propertiesThe properties.

Member Function Documentation

◆ CreateMapiNode()

virtual System::SharedPtr<Nodes::IMapiNode> Aspose::Email::Mapi::MapiPropertyContainer::CreateMapiNode ( System::String  key)
virtual

Creates the mapi node.

Parameters
keyThe node key.
Returns
The IMapiNode interface.

Reimplemented in Aspose::Email::Mapi::MapiRecipient, and Aspose::Email::Mapi::MapiAttachment.

◆ get_CodePage()

virtual int32_t Aspose::Email::Mapi::MapiPropertyContainer::get_CodePage ( )
virtual

Gets the code page.

The code page.

◆ get_CurrentEncoding()

System::SharedPtr<System::Text::Encoding> Aspose::Email::Mapi::MapiPropertyContainer::get_CurrentEncoding ( )

◆ get_Properties()

virtual System::SharedPtr<MapiPropertyCollection> Aspose::Email::Mapi::MapiPropertyContainer::get_Properties ( )
virtual

Gets the collection of properties.

The properties.

Reimplemented in Aspose::Email::Mapi::MapiPropertyStream.

◆ GetProperty()

virtual System::SharedPtr<MapiProperty> Aspose::Email::Mapi::MapiPropertyContainer::GetProperty ( System::SharedPtr< PropertyDescriptor pd)
virtual

Gets MAPI property by property descriptor.

Parameters
pdProperty descriptor for looked property
Returns
Mapi property if it is found, otherwise null.

Reimplemented in Aspose::Email::Mapi::MapiMessageItemBase, and Aspose::Email::Mapi::MapiAttachment.

◆ GetPropertyBoolean()

System::Nullable<bool> Aspose::Email::Mapi::MapiPropertyContainer::GetPropertyBoolean ( int64_t  tag)

Gets the value of the property specified by tag as Boolean type.

Parameters
tagThe MAPI property tag.
Returns
The value of the property. If the property does not exist, returns NULL; otherwise, returns the value.

◆ GetPropertyBytes()

System::ArrayPtr<uint8_t> Aspose::Email::Mapi::MapiPropertyContainer::GetPropertyBytes ( int64_t  tag)

Gets the string value of the property specified by tag.

Parameters
tagThe MAPI property tag.
Returns
The value of the property. If the property does not exist, returns NULL; otherwise, returns the value.

◆ GetPropertyDateTime()

System::Nullable<System::DateTime> Aspose::Email::Mapi::MapiPropertyContainer::GetPropertyDateTime ( int64_t  key)

Gets the value of the property specified by tag as DateTime type.

Parameters
keyThe MAPI property tag.
Returns
The value of the property. If the property does not exist, returns NULL; otherwise, returns the value.

◆ GetPropertyInt32()

System::Nullable<int32_t> Aspose::Email::Mapi::MapiPropertyContainer::GetPropertyInt32 ( int64_t  tag)

Gets the int32 value of the property specified by tag.

Parameters
tagThe MAPI property tag.
Returns
The value of the property. If the property does not exist, returns NULL; otherwise, returns the value.

◆ GetPropertyLong()

System::Nullable<int64_t> Aspose::Email::Mapi::MapiPropertyContainer::GetPropertyLong ( int64_t  tag)

Gets the value of the property specified by tag as Long (int64) type.

Parameters
tagThe MAPI property tag.
Returns
The value of the property. If the property does not exist, returns NULL; otherwise, returns the value.

◆ GetPropertyShort()

System::Nullable<int16_t> Aspose::Email::Mapi::MapiPropertyContainer::GetPropertyShort ( int64_t  tag)

Gets the value of the property specified by tag as Short type.

Parameters
tagThe MAPI property tag.
Returns
The value of the property. If the property does not exist, returns NULL; otherwise, returns the value.

◆ GetPropertyString() [1/2]

System::String Aspose::Email::Mapi::MapiPropertyContainer::GetPropertyString ( int64_t  tag)

Gets the string value of the property specified by tag.

Parameters
tagThe MAPI property tag.
Returns
The value of the property. If the property does not exist, returns NULL; otherwise, returns the value.

◆ GetPropertyString() [2/2]

System::String Aspose::Email::Mapi::MapiPropertyContainer::GetPropertyString ( int64_t  tag,
int32_t  codepage 
)

Gets the string value of the property specified by tag.

Parameters
tagThe MAPI property tag.
codepageThe specified codepage used to get string value.
Returns
The value of the property. If the property does not exist, returns NULL; otherwise, returns the value.

◆ GetSubStorages()

System::SharedPtr<MapiPropertyCollection> Aspose::Email::Mapi::MapiPropertyContainer::GetSubStorages ( )

◆ IsStoreUnicodeOk()

bool Aspose::Email::Mapi::MapiPropertyContainer::IsStoreUnicodeOk ( )

Determines if string properties are Unicode encoded or not.

Returns
True, if string properties are Unicode encoded.

◆ SetProperty() [1/8]

void Aspose::Email::Mapi::MapiPropertyContainer::SetProperty ( int64_t  tag,
System::ArrayPtr< uint8_t >  data 
)

Set the property.

Parameters
tagThe tag.
dataThe property data.

◆ SetProperty() [2/8]

void Aspose::Email::Mapi::MapiPropertyContainer::SetProperty ( int64_t  tag,
System::DateTime  dateTime 
)

Set the datetime property.

Parameters
tagThe tag.
dateTimeThe dateTime.

◆ SetProperty() [3/8]

void Aspose::Email::Mapi::MapiPropertyContainer::SetProperty ( int64_t  tag,
System::String  value 
)

Set the string property with CurrentEncoding

Parameters
tagThe tag.
valueThe property value.

◆ SetProperty() [4/8]

void Aspose::Email::Mapi::MapiPropertyContainer::SetProperty ( int64_t  tag,
System::String  value,
bool  isUnicode 
)

Set the string property.

Parameters
tagThe tag.
valueThe property value.
isUnicodeIf true, the Unicode encoding is used, otherwise the CurrentEncoding.

◆ SetProperty() [5/8]

void Aspose::Email::Mapi::MapiPropertyContainer::SetProperty ( int64_t  tag,
System::String  value,
OutlookMessageFormat  format 
)

Set the string property.

Parameters
tagThe tag.
valueThe property value.
formatThe type of encoding. If format == Unicode, the Unicode encoding is used, otherwise the CurrentEncoding.

◆ SetProperty() [6/8]

void Aspose::Email::Mapi::MapiPropertyContainer::SetProperty ( int64_t  tag,
System::String  value,
System::SharedPtr< System::Text::Encoding >  nonUnicodeEncoding 
)

Set the string property.

Parameters
tagThe tag.
valueThe property value.
nonUnicodeEncodingIf message is Unicode, the Unicode encoding is used, otherwise the nonUnicodeEncoding.

◆ SetProperty() [7/8]

virtual void Aspose::Email::Mapi::MapiPropertyContainer::SetProperty ( System::SharedPtr< MapiProperty value)
virtual

Sets the property.

Parameters
valueThe property.
Exceptions
ArgumentNullExceptionIf value is null.
ArgumentExceptionIf property data is null.
InvalidOperationExceptionIf data type is not supported.

Reimplemented in Aspose::Email::Mapi::MapiAttachment.

◆ SetProperty() [8/8]

virtual void Aspose::Email::Mapi::MapiPropertyContainer::SetProperty ( System::SharedPtr< PropertyDescriptor pd,
System::SharedPtr< System::Object >  value 
)
virtual

Sets MAPI property.

Parameters
pdThe property descriptor.
valueThe property data.

Reimplemented in Aspose::Email::Mapi::MapiMessageItemBase, and Aspose::Email::Mapi::MapiAttachment.

◆ SetPropertyLong()

void Aspose::Email::Mapi::MapiPropertyContainer::SetPropertyLong ( int64_t  tag,
int64_t  value 
)

Set the long property.

Parameters
tagThe tag.
valueThe value.

◆ TryGetNamedProperty()

virtual bool Aspose::Email::Mapi::MapiPropertyContainer::TryGetNamedProperty ( System::SharedPtr< MapiProperty mapiProperty,
System::SharedPtr< MapiNamedProperty > &  mapiNamedProperty 
)
virtual

If MapiNamedPropertyMappingStorage is available, initializes and returns MapiNamedProperty, otherwise null.

Parameters
mapiProperty
mapiNamedProperty
Returns

Reimplemented in Aspose::Email::Mapi::MapiRecipient, Aspose::Email::Mapi::MapiNamedPropertyMappingStorage, Aspose::Email::Mapi::MapiMessageItemBase, and Aspose::Email::Mapi::MapiAttachment.

◆ TryGetPropertyData()

System::ArrayPtr<uint8_t> Aspose::Email::Mapi::MapiPropertyContainer::TryGetPropertyData ( int64_t  tag)

Try to get the property data with specified tag key.

Parameters
tagThe tag key.
Returns
The property data.

◆ TryGetPropertyDateTime()

bool Aspose::Email::Mapi::MapiPropertyContainer::TryGetPropertyDateTime ( int64_t  tag,
System::DateTime &  value 
)

Gets the value of the specified property as DateTime type. A return value indicates whether the operation succeeded.

Parameters
tagThe MAPI property tag.
valueWhen this method returns, contains the value of the specified property, if the property exists. This parameter is passed uninitialized.
Returns
true if s was converted successfully; otherwise, false.

◆ TryGetPropertyInt32()

bool Aspose::Email::Mapi::MapiPropertyContainer::TryGetPropertyInt32 ( int64_t  tag,
int32_t &  value 
)

Gets the value of the specified property as Int32 type. A return value indicates whether the operation succeeded.

Parameters
tagThe MAPI property tag.
valueWhen this method returns, contains the value of the specified property, if the property exists. This parameter is passed uninitialized.
Returns
true if s was converted successfully; otherwise, false.

◆ TryGetPropertyLong()

bool Aspose::Email::Mapi::MapiPropertyContainer::TryGetPropertyLong ( int64_t  tag,
int64_t &  value 
)

Gets the value of the specified property as Long type. A return value indicates whether the operation succeeded.

Parameters
tagThe MAPI property tag.
valueWhen this method returns, contains the value of the specified property, if the property exists. This parameter is passed uninitialized.
Returns
true if s was converted successfully; otherwise, false.

◆ TryGetPropertyString() [1/4]

System::String Aspose::Email::Mapi::MapiPropertyContainer::TryGetPropertyString ( int64_t  tag)

Try to get a property data as string with specified tag.

Parameters
tagThe property tag key.
Returns
String that contains the contents of property data.

◆ TryGetPropertyString() [2/4]

System::String Aspose::Email::Mapi::MapiPropertyContainer::TryGetPropertyString ( int64_t  tag,
int32_t  codepage 
)

Try to get a property data as string with specified tag and code page.

Parameters
tagThe property tag key.
codepageThe code page.
Returns
String that contains the contents of property data.

◆ TryGetPropertyString() [3/4]

bool Aspose::Email::Mapi::MapiPropertyContainer::TryGetPropertyString ( int64_t  tag,
System::String &  value 
)

Gets the value of the specified property as String type. A return value indicates whether the operation succeeded.

Parameters
tagThe MAPI property tag.
valueWhen this method returns, contains the value of the specified property, if the property exists. This parameter is passed uninitialized.
Returns
true if s was converted successfully; otherwise, false.

◆ TryGetPropertyString() [4/4]

bool Aspose::Email::Mapi::MapiPropertyContainer::TryGetPropertyString ( int64_t  tag,
System::String &  value,
int32_t  codepage 
)

Gets the value of the specified property as String type. A return value indicates whether the operation succeeded.

Parameters
tagThe MAPI property tag.
valueWhen this method returns, contains the value of the specified property, if the property exists. This parameter is passed uninitialized.
codepageThe specified codepage used to get string value.
Returns
true if s was converted successfully; otherwise, false.

Friends And Related Function Documentation

◆ Aspose::Email::Attachment

friend class Aspose::Email::Attachment
friend

◆ Aspose::Email::Clients::Exchange::Dav::ExchangeClient

◆ Aspose::Email::LinkedResource

friend class Aspose::Email::LinkedResource
friend

◆ Aspose::Email::MailMessage

friend class Aspose::Email::MailMessage
friend

◆ Aspose::Email::Mapi::FollowUpManager

◆ Aspose::Email::Mapi::MailMessageInterpretor

friend class Aspose::Email::Mapi::MailMessageInterpretor
friend

◆ Aspose::Email::Mapi::MapiAttachment

◆ Aspose::Email::Mapi::MapiAttachmentCollection

◆ Aspose::Email::Mapi::MapiAttachmentPropertyStream

◆ Aspose::Email::Mapi::MapiCalendar

friend class Aspose::Email::Mapi::MapiCalendar
friend

◆ Aspose::Email::Mapi::MapiCalendarExceptionInfo

◆ Aspose::Email::Mapi::MapiContact

friend class Aspose::Email::Mapi::MapiContact
friend

◆ Aspose::Email::Mapi::MapiContactNamePropertySet

◆ Aspose::Email::Mapi::MapiContactOtherPropertySet

◆ Aspose::Email::Mapi::MapiContactPersonalInfoPropertySet

◆ Aspose::Email::Mapi::MapiContactPhoto

◆ Aspose::Email::Mapi::MapiDistributionList

◆ Aspose::Email::Mapi::MapiMessage

friend class Aspose::Email::Mapi::MapiMessage
friend

◆ Aspose::Email::Mapi::MapiMessageItemBase

◆ Aspose::Email::Mapi::MapiMessagePropertyStream

◆ Aspose::Email::Mapi::MapiNamedPropertyMappingStorage

◆ Aspose::Email::Mapi::MapiNote

friend class Aspose::Email::Mapi::MapiNote
friend

◆ Aspose::Email::Mapi::MapiObjectProperty

◆ Aspose::Email::Mapi::MapiRecipient

◆ Aspose::Email::Mapi::MapiRecipientPropertyStream

◆ Aspose::Email::Mapi::MapiTask

friend class Aspose::Email::Mapi::MapiTask
friend

◆ Aspose::Email::Mapi::MapiTaskUsers

◆ Aspose::Email::Mapi::Nodes::AttachmentDirectory

friend class Aspose::Email::Mapi::Nodes::AttachmentDirectory
friend

◆ Aspose::Email::Mapi::Nodes::CustomObjectNode

friend class Aspose::Email::Mapi::Nodes::CustomObjectNode
friend

◆ Aspose::Email::Mapi::Nodes::NamedPropertyMappingDirectory

friend class Aspose::Email::Mapi::Nodes::NamedPropertyMappingDirectory
friend

◆ Aspose::Email::Mapi::Nodes::RecipientDirectory

friend class Aspose::Email::Mapi::Nodes::RecipientDirectory
friend

◆ Aspose::Email::Mapi::OutlookUtil

friend class Aspose::Email::Mapi::OutlookUtil
friend

◆ Aspose::Email::Storage::Pst::FolderInfo

◆ Aspose::Email::Storage::Pst::PstDoer

friend class Aspose::Email::Storage::Pst::PstDoer
friend

◆ Aspose::Email::Tnef::TnefAttachment

friend class Aspose::Email::Tnef::TnefAttachment
friend

◆ Aspose::Email::Tools::ContactConverter

friend class Aspose::Email::Tools::ContactConverter
friend

◆ Aspose::Email::Tools::ForwardMessageBuilder

◆ Aspose::Email::Tools::ReplyMessageBuilder

◆ Aspose::Email::Tools::ResponseMessageBuilder

Member Data Documentation

◆ codePage

int32_t Aspose::Email::Mapi::MapiPropertyContainer::codePage

The code page.

◆ DefaultCodePage

const int32_t Aspose::Email::Mapi::MapiPropertyContainer::DefaultCodePage
static

◆ propertyDictionary

System::SharedPtr<MapiPropertyCollection> Aspose::Email::Mapi::MapiPropertyContainer::propertyDictionary

The property dictionary.