Represents the attachment in the E-mail message. More...
Inherits Aspose::Email::Mapi::MapiPropertyContainer.
Public Member Functions | |
virtual System::String | get_ItemId () |
The item id, uses with a server More... | |
virtual void | set_ItemId (System::String value) |
The item id, uses with a server More... | |
virtual bool | get_IsInline () |
Gets a value indicating whether the attachment is inline or regular. If inline returns true, otherwise false. More... | |
System::String | get_Extension () |
Gets a filename extension that indicates the document type of an attachment. More... | |
System::SharedPtr< MapiPropertyStream > | get_PropertyStream () |
Gets the property stream. More... | |
System::SharedPtr< MapiPropertyCollection > | get_SubStorages () |
Gets the sub storages. More... | |
System::String | get_FileName () |
Gets an attachment's base filename and extension, excluding path. More... | |
System::String | get_LongFileName () |
Gets an attachment's long filename and extension, excluding path. More... | |
System::String | get_DisplayName () |
Gets the display name of the ole object in an attachment. More... | |
void | set_DisplayName (System::String value) |
Gets the display name of the ole object in an attachment. More... | |
System::String | get_MimeTag () |
Gets formatting information about a Multipurpose Internet Mail Extensions (MIME) attachment. More... | |
System::ArrayPtr< uint8_t > | get_BinaryData () |
Gets binary attachment data. More... | |
void | set_BinaryData (System::ArrayPtr< uint8_t > value) |
Sets binary attachment data. More... | |
System::SharedPtr< System::Object > | get_Content () |
Gets the content. More... | |
System::String | get_ContentId () |
System::SharedPtr< MapiObjectProperty > | get_ObjectData () |
Gets an attachment object typically accessed through the OLE IStorage interface. More... | |
System::SharedPtr< MapiPropertyCollection > | get_NamedProperties () |
Gets the named properties of message. More... | |
bool | get_Hidden () |
MapiAttachment () | |
Initializes a new instance of the MapiAttachment class. More... | |
MapiAttachment (System::String itemId, System::String attachName, System::ArrayPtr< uint8_t > attachData, int32_t count) | |
Initializes a new instance of the MapiAttachment class. More... | |
MapiAttachment (System::String itemId, System::String attachName, System::ArrayPtr< uint8_t > attachData, System::String mediaType, int32_t count) | |
Initializes a new instance of the MapiAttachment class. More... | |
MapiAttachment (System::String attachName, System::ArrayPtr< uint8_t > attachData, int32_t count, OutlookMessageFormat format, bool preserveDates, int32_t codePage) | |
Initializes a new instance of the MapiAttachment class. More... | |
MapiAttachment (System::String attachName, System::SharedPtr< MapiMessageItemBase > attachMsg, int32_t count, OutlookMessageFormat format, bool preserveDates, int32_t codePage) | |
Initializes a new instance of the MapiAttachment class. More... | |
MapiAttachment (System::String attachName, System::String attachContentId, System::ArrayPtr< uint8_t > attachData, int32_t count, OutlookMessageFormat format, bool preserveDates) | |
Initializes a new instance of the MapiAttachment class. More... | |
MapiAttachment (System::String attachName, System::SharedPtr< MapiMessage > attachMsg, int32_t count, OutlookMessageFormat format, bool preserveDates) | |
Initializes a new instance of the MapiAttachment class. More... | |
MapiAttachment (System::SharedPtr< ReferenceAttachment > refAttach, int32_t codePage, int32_t count, OutlookMessageFormat format, bool preserveDates) | |
void | SetNamedPropertyMapping (System::SharedPtr< MapiNamedPropertyMappingStorage > value) |
Sets the named property mapping. More... | |
void | Save (System::String filename) |
Save attachment content. More... | |
void | Save (System::SharedPtr< System::IO::Stream > stream) |
Save attachment content. More... | |
void | SaveInternal (System::SharedPtr< System::IO::Stream > stream) |
Save attachment content. More... | |
void | SetProperty (System::SharedPtr< MapiProperty > value) override |
Sets the property. More... | |
void | RemoveProperty (int64_t tag) |
Provides correctly removing property from all collections. More... | |
System::SharedPtr< Nodes::IMapiNode > | CreateMapiNode (System::String key) override |
Creates the mapi node. More... | |
void | SetOwner (System::SharedPtr< MapiMessageItemBase > owner) |
Sets the owner. More... | |
int32_t | GetSize () |
Gets the size of the attachment. Contains the sum, in bytes, of the sizes of all properties on an attachment. The sum contained in PR_ATTACH_SIZE property includes the size of the PR_ATTACH_DATA_BIN or PR_ATTACH_DATA_OBJ property. More... | |
System::SharedPtr< MapiAttachment > | Clone () |
System::SharedPtr< System::IO::MemoryStream > | ToMemoryStream () |
System::SharedPtr< MapiMessage > | ToMapiMessage () |
System::SharedPtr< MapiProperty > | GetProperty (System::SharedPtr< PropertyDescriptor > pd) override |
Gets MAPI property by property descriptor. More... | |
bool | TryGetNamedProperty (System::SharedPtr< MapiProperty > mapiProperty, System::SharedPtr< MapiNamedProperty > &mapiNamedProperty) override |
If MapiNamedPropertyMappingStorage is available, initializes and returns MapiNamedProperty, otherwise null. More... | |
void | SetProperty (System::SharedPtr< PropertyDescriptor > pd, System::SharedPtr< System::Object > value) override |
Sets MAPI property. More... | |
Public Member Functions inherited from Aspose::Email::Mapi::MapiPropertyContainer | |
virtual System::SharedPtr< MapiPropertyCollection > | get_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... | |
System::SharedPtr< MapiPropertyCollection > | GetSubStorages () |
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... | |
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... | |
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... | |
Public Attributes | |
System::SharedPtr< MapiNamedPropertyMappingStorage > | namedPropertyMappingStorage |
The named property mapping storage. More... | |
Public Attributes inherited from Aspose::Email::Mapi::MapiPropertyContainer | |
int32_t | codePage |
The code page. More... | |
System::SharedPtr< MapiPropertyCollection > | propertyDictionary |
The property dictionary. More... | |
Protected Member Functions | |
virtual | ~MapiAttachment () |
Protected Member Functions inherited from Aspose::Email::Mapi::MapiPropertyContainer | |
virtual | ~MapiPropertyContainer () |
Additional Inherited Members | |
Static Public Attributes inherited from Aspose::Email::Mapi::MapiPropertyContainer | |
static const int32_t | DefaultCodePage |
Represents the attachment in the E-mail message.
Aspose::Email::Mapi::MapiAttachment::MapiAttachment | ( | ) |
Initializes a new instance of the MapiAttachment class.
Aspose::Email::Mapi::MapiAttachment::MapiAttachment | ( | System::String | itemId, |
System::String | attachName, | ||
System::ArrayPtr< uint8_t > | attachData, | ||
int32_t | count | ||
) |
Initializes a new instance of the MapiAttachment class.
itemId | The attachment id |
attachName | Name of the attach. |
attachData | The attach data. |
count | The attachments quantity. |
Aspose::Email::Mapi::MapiAttachment::MapiAttachment | ( | System::String | itemId, |
System::String | attachName, | ||
System::ArrayPtr< uint8_t > | attachData, | ||
System::String | mediaType, | ||
int32_t | count | ||
) |
Initializes a new instance of the MapiAttachment class.
itemId | The attachment id |
attachName | Name of the attach. |
attachData | The attach data. |
mediaType | The media type name. |
count | The attachments quantity. |
Aspose::Email::Mapi::MapiAttachment::MapiAttachment | ( | System::String | attachName, |
System::ArrayPtr< uint8_t > | attachData, | ||
int32_t | count, | ||
OutlookMessageFormat | format, | ||
bool | preserveDates, | ||
int32_t | codePage | ||
) |
Initializes a new instance of the MapiAttachment class.
attachName | Name of the attach. |
attachData | The attach data. |
count | The count. |
format | The format. |
preserveDates | If set to true [preserve dates]. |
codePage |
Aspose::Email::Mapi::MapiAttachment::MapiAttachment | ( | System::String | attachName, |
System::SharedPtr< MapiMessageItemBase > | attachMsg, | ||
int32_t | count, | ||
OutlookMessageFormat | format, | ||
bool | preserveDates, | ||
int32_t | codePage | ||
) |
Initializes a new instance of the MapiAttachment class.
attachName | Name of the attach. |
attachMsg | |
count | The count. |
format | The format. |
preserveDates | If set to true [preserve dates]. |
codePage |
Aspose::Email::Mapi::MapiAttachment::MapiAttachment | ( | System::String | attachName, |
System::String | attachContentId, | ||
System::ArrayPtr< uint8_t > | attachData, | ||
int32_t | count, | ||
OutlookMessageFormat | format, | ||
bool | preserveDates | ||
) |
Initializes a new instance of the MapiAttachment class.
attachName | Name of the attach. |
attachContentId | ContentId of the attachment. |
attachData | The attach data. |
count | The count. |
format | The format. |
preserveDates | If set to true [preserve dates]. |
Aspose::Email::Mapi::MapiAttachment::MapiAttachment | ( | System::String | attachName, |
System::SharedPtr< MapiMessage > | attachMsg, | ||
int32_t | count, | ||
OutlookMessageFormat | format, | ||
bool | preserveDates | ||
) |
Initializes a new instance of the MapiAttachment class.
attachName | Name of the attach. |
attachMsg | The mapi message that will be attached. |
count | The count. |
format | The format. |
preserveDates | If set to true [preserve dates]. |
Aspose::Email::Mapi::MapiAttachment::MapiAttachment | ( | System::SharedPtr< ReferenceAttachment > | refAttach, |
int32_t | codePage, | ||
int32_t | count, | ||
OutlookMessageFormat | format, | ||
bool | preserveDates | ||
) |
|
protectedvirtual |
System::SharedPtr<MapiAttachment> Aspose::Email::Mapi::MapiAttachment::Clone | ( | ) |
|
overridevirtual |
Creates the mapi node.
key | The node key. |
Reimplemented from Aspose::Email::Mapi::MapiPropertyContainer.
System::ArrayPtr<uint8_t> Aspose::Email::Mapi::MapiAttachment::get_BinaryData | ( | ) |
Gets binary attachment data.
The binary data.
System::SharedPtr<System::Object> Aspose::Email::Mapi::MapiAttachment::get_Content | ( | ) |
Gets the content.
The content.
System::String Aspose::Email::Mapi::MapiAttachment::get_ContentId | ( | ) |
System::String Aspose::Email::Mapi::MapiAttachment::get_DisplayName | ( | ) |
Gets the display name of the ole object in an attachment.
The display name.
System::String Aspose::Email::Mapi::MapiAttachment::get_Extension | ( | ) |
Gets a filename extension that indicates the document type of an attachment.
The extension.
System::String Aspose::Email::Mapi::MapiAttachment::get_FileName | ( | ) |
Gets an attachment's base filename and extension, excluding path.
The file name.
bool Aspose::Email::Mapi::MapiAttachment::get_Hidden | ( | ) |
|
virtual |
Gets a value indicating whether the attachment is inline or regular. If inline returns true, otherwise false.
|
virtual |
The item id, uses with a server
System::String Aspose::Email::Mapi::MapiAttachment::get_LongFileName | ( | ) |
Gets an attachment's long filename and extension, excluding path.
The long file name.
System::String Aspose::Email::Mapi::MapiAttachment::get_MimeTag | ( | ) |
Gets formatting information about a Multipurpose Internet Mail Extensions (MIME) attachment.
The mime tag.
System::SharedPtr<MapiPropertyCollection> Aspose::Email::Mapi::MapiAttachment::get_NamedProperties | ( | ) |
Gets the named properties of message.
The collection of named properties.
System::SharedPtr<MapiObjectProperty> Aspose::Email::Mapi::MapiAttachment::get_ObjectData | ( | ) |
Gets an attachment object typically accessed through the OLE IStorage interface.
The object data.
System::SharedPtr<MapiPropertyStream> Aspose::Email::Mapi::MapiAttachment::get_PropertyStream | ( | ) |
Gets the property stream.
The property stream.
System::SharedPtr<MapiPropertyCollection> Aspose::Email::Mapi::MapiAttachment::get_SubStorages | ( | ) |
Gets the sub storages.
The sub storages.
|
overridevirtual |
Gets MAPI property by property descriptor.
pd | Property descriptor for looked property |
Reimplemented from Aspose::Email::Mapi::MapiPropertyContainer.
int32_t Aspose::Email::Mapi::MapiAttachment::GetSize | ( | ) |
Gets the size of the attachment. Contains the sum, in bytes, of the sizes of all properties on an attachment. The sum contained in PR_ATTACH_SIZE property includes the size of the PR_ATTACH_DATA_BIN or PR_ATTACH_DATA_OBJ property.
void Aspose::Email::Mapi::MapiAttachment::RemoveProperty | ( | int64_t | tag | ) |
Provides correctly removing property from all collections.
tag | The tag of MapiProperty. |
void Aspose::Email::Mapi::MapiAttachment::Save | ( | System::SharedPtr< System::IO::Stream > | stream | ) |
Save attachment content.
stream | The stream to save. |
void Aspose::Email::Mapi::MapiAttachment::Save | ( | System::String | filename | ) |
Save attachment content.
filename | The file name to save. |
void Aspose::Email::Mapi::MapiAttachment::SaveInternal | ( | System::SharedPtr< System::IO::Stream > | stream | ) |
Save attachment content.
stream | The stream to save. |
void Aspose::Email::Mapi::MapiAttachment::set_BinaryData | ( | System::ArrayPtr< uint8_t > | value | ) |
Sets binary attachment data.
The binary data.
void Aspose::Email::Mapi::MapiAttachment::set_DisplayName | ( | System::String | value | ) |
Gets the display name of the ole object in an attachment.
The display name.
|
virtual |
The item id, uses with a server
void Aspose::Email::Mapi::MapiAttachment::SetNamedPropertyMapping | ( | System::SharedPtr< MapiNamedPropertyMappingStorage > | value | ) |
Sets the named property mapping.
value | The MapiNamedPropertyMappingStorage. |
void Aspose::Email::Mapi::MapiAttachment::SetOwner | ( | System::SharedPtr< MapiMessageItemBase > | owner | ) |
Sets the owner.
owner | The owner message. |
|
overridevirtual |
Sets the property.
value | The property. |
ArgumentNullException | If value is null. |
ArgumentException | If property data is null. |
InvalidOperationException | If data type is not supported. |
Reimplemented from Aspose::Email::Mapi::MapiPropertyContainer.
|
overridevirtual |
Sets MAPI property.
pd | The property descriptor. |
value | The property data. |
Reimplemented from Aspose::Email::Mapi::MapiPropertyContainer.
System::SharedPtr<MapiMessage> Aspose::Email::Mapi::MapiAttachment::ToMapiMessage | ( | ) |
System::SharedPtr<System::IO::MemoryStream> Aspose::Email::Mapi::MapiAttachment::ToMemoryStream | ( | ) |
|
overridevirtual |
If MapiNamedPropertyMappingStorage is available, initializes and returns MapiNamedProperty, otherwise null.
mapiProperty | |
mapiNamedProperty |
Reimplemented from Aspose::Email::Mapi::MapiPropertyContainer.
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
System::SharedPtr<MapiNamedPropertyMappingStorage> Aspose::Email::Mapi::MapiAttachment::namedPropertyMappingStorage |
The named property mapping storage.