Base class for mail attachment. More...

Inherits IDisposable.

Inherited by Aspose::Email::AlternateView, Aspose::Email::Attachment, and Aspose::Email::LinkedResource.

Public Member Functions

System::SharedPtr< System::IO::Stream > get_ContentStream ()
 Gets the content stream. More...
 
void set_ContentStream (System::SharedPtr< System::IO::Stream > value)
 Sets the content stream. More...
 
System::String get_ContentId ()
 Gets the content id. More...
 
void set_ContentId (System::String value)
 Sets the content id. More...
 
virtual System::SharedPtr< Mime::HeaderCollectionget_Headers ()
 Gets headers collection of attachment. More...
 
System::SharedPtr< Aspose::Email::Mime::ContentTypeget_ContentType ()
 Gets the type of the content. More...
 
void set_ContentType (System::SharedPtr< Aspose::Email::Mime::ContentType > value)
 Sets the type of the content. More...
 
Aspose::Email::Mime::TransferEncoding get_TransferEncoding ()
 Gets the transfer encoding. More...
 
void set_TransferEncoding (Aspose::Email::Mime::TransferEncoding value)
 Sets the transfer encoding. More...
 
System::SharedPtr< System::Uri > get_ContentLocation () const
 Gets the content location. More...
 
void set_ContentLocation (System::SharedPtr< System::Uri > value)
 Sets the content location. More...
 
System::String get_ItemId () const
 
void set_ItemId (System::String value)
 
System::SharedPtr< Aspose::Email::Mime::MimePart > get_MimePart () const
 Gets the MIME part. More...
 
void set_MimePart (System::SharedPtr< Aspose::Email::Mime::MimePart > value)
 Sets the MIME part. More...
 
bool get_Hidden ()
 
void set_Hidden (bool value)
 
virtual void SaveInternal (System::SharedPtr< System::IO::Stream > stream)
 Saves the specified stream. More...
 
virtual void Save (System::SharedPtr< System::IO::Stream > stream)
 Saves the specified stream. More...
 
virtual void Save (System::String fileName)
 Saves the specified file name. More...
 
void SetContentFromString (System::String contentString, System::SharedPtr< Aspose::Email::Mime::ContentType > contentType)
 Sets the content from string. More...
 
void SetContentFromString (System::String contentString, System::SharedPtr< System::Text::Encoding > encoding, System::String mediaType)
 Sets the content from string. More...
 
void SetContentFromString (System::String contentString, System::SharedPtr< System::Text::Encoding > encoding, System::SharedPtr< Aspose::Email::Mime::ContentType > contentType, Aspose::Email::Mime::TransferEncoding te)
 Sets the content from string. More...
 
void SetSTnefContent (System::ArrayPtr< uint8_t > data)
 Sets the S/TNEF content. More...
 
virtual void PrepareForSending ()
 Prepares for sending. More...
 
virtual System::SharedPtr< Mapi::MapiAttachmentConvertToMapiAttachment (Mapi::OutlookMessageFormat format, int32_t codePage, int32_t count, bool preserveDates)=0
 
void Dispose () override
 Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. More...
 

Public Attributes

bool Disposed
 Is disposed. More...
 
int32_t TnefAttachIndex
 

Protected Member Functions

 AttachmentBase ()
 Initializes a new instance of the AttachmentBase class. More...
 
 AttachmentBase (System::SharedPtr< System::IO::Stream > contentStream, System::String name, System::String mediaType)
 Initializes a new instance of the AttachmentBase class. More...
 
 AttachmentBase (System::String fileName)
 Initializes a new instance of the AttachmentBase class. More...
 
 AttachmentBase (System::String fileName, System::String mediaType)
 Initializes a new instance of the AttachmentBase class. More...
 
 AttachmentBase (System::String fileName, System::SharedPtr< Aspose::Email::Mime::ContentType > contentType)
 Initializes a new instance of the AttachmentBase class. More...
 
 AttachmentBase (System::SharedPtr< System::IO::Stream > contentStream)
 Initializes a new instance of the AttachmentBase class. More...
 
 AttachmentBase (System::SharedPtr< System::IO::Stream > contentStream, System::String mediaType)
 Initializes a new instance of the AttachmentBase class. More...
 
 AttachmentBase (System::SharedPtr< System::IO::Stream > contentStream, System::SharedPtr< Aspose::Email::Mime::ContentType > contentType)
 Initializes a new instance of the AttachmentBase class. More...
 
virtual System::String GenerateContentId ()
 Generates the content id value. More...
 
virtual void Dispose (bool disposing)
 Releases unmanaged and - optionally - managed resources. More...
 
virtual ~AttachmentBase ()
 

Static Protected Member Functions

static System::SharedPtr< System::Text::Encoding > GetEncodingFromContent (System::String contentString, System::SharedPtr< Aspose::Email::Mime::ContentType > contentType)
 Defines Encoding from content. More...
 

Friends

class Aspose::Email::AlternateView
 
class Aspose::Email::MailMessage
 
class Aspose::Email::Attachment
 
class Aspose::Email::Calendar::Appointment
 
class Aspose::Email::Tools::ContactConverter
 
class Aspose::Email::Clients::Exchange::WebService::EWSClient2007
 
class Aspose::Email::Clients::Exchange::WebService::Implementation::Appointments::Create::EwsClientAppointmentCreate
 
class Aspose::Email::Clients::Exchange::WebService::Implementation::Tasks::Create::EwsClientTaskCreate
 
class Aspose::Email::Clients::Graph::V1::Commands::CreateMailAttachmentCommand
 
class Aspose::Email::Clients::Graph::V1::Commands::ListMailAttachmentsCommand
 
class Aspose::Email::Clients::Graph::GraphClientV1
 
class Aspose::Email::Clients::Graph::V1::Model::TLFileAttachment
 
class Aspose::Email::LinkedResource
 
class Aspose::Email::Mapi::MailMessageInterpretor
 
class Aspose::Email::Mapi::OpaqueSignedMailMessageInterpretor
 
class Aspose::Email::Mapi::MapiMessage
 
class Aspose::Email::Mapi::OutlookUtil
 
class Aspose::Email::Tnef::TnefAttachment
 

Detailed Description

Base class for mail attachment.

Constructor & Destructor Documentation

◆ AttachmentBase() [1/8]

Aspose::Email::AttachmentBase::AttachmentBase ( )
protected

Initializes a new instance of the AttachmentBase class.

◆ AttachmentBase() [2/8]

Aspose::Email::AttachmentBase::AttachmentBase ( System::SharedPtr< System::IO::Stream >  contentStream,
System::String  name,
System::String  mediaType 
)
protected

Initializes a new instance of the AttachmentBase class.

Parameters
contentStreamThe content stream.
nameThe attachment name.
mediaTypeType of the media.

◆ AttachmentBase() [3/8]

Aspose::Email::AttachmentBase::AttachmentBase ( System::String  fileName)
protected

Initializes a new instance of the AttachmentBase class.

Parameters
fileNameName of the file.

◆ AttachmentBase() [4/8]

Aspose::Email::AttachmentBase::AttachmentBase ( System::String  fileName,
System::String  mediaType 
)
protected

Initializes a new instance of the AttachmentBase class.

Parameters
fileNameName of the file.
mediaTypeType of the media.

◆ AttachmentBase() [5/8]

Aspose::Email::AttachmentBase::AttachmentBase ( System::String  fileName,
System::SharedPtr< Aspose::Email::Mime::ContentType contentType 
)
protected

Initializes a new instance of the AttachmentBase class.

Parameters
fileNameName of the file.
contentTypeType of the content.

◆ AttachmentBase() [6/8]

Aspose::Email::AttachmentBase::AttachmentBase ( System::SharedPtr< System::IO::Stream >  contentStream)
protected

Initializes a new instance of the AttachmentBase class.

Parameters
contentStreamThe content stream.

◆ AttachmentBase() [7/8]

Aspose::Email::AttachmentBase::AttachmentBase ( System::SharedPtr< System::IO::Stream >  contentStream,
System::String  mediaType 
)
protected

Initializes a new instance of the AttachmentBase class.

Parameters
contentStreamThe content stream.
mediaTypeType of the media.

◆ AttachmentBase() [8/8]

Aspose::Email::AttachmentBase::AttachmentBase ( System::SharedPtr< System::IO::Stream >  contentStream,
System::SharedPtr< Aspose::Email::Mime::ContentType contentType 
)
protected

Initializes a new instance of the AttachmentBase class.

Parameters
contentStreamThe content stream.
contentTypeType of the content.

◆ ~AttachmentBase()

virtual Aspose::Email::AttachmentBase::~AttachmentBase ( )
protectedvirtual

Member Function Documentation

◆ ConvertToMapiAttachment()

virtual System::SharedPtr<Mapi::MapiAttachment> Aspose::Email::AttachmentBase::ConvertToMapiAttachment ( Mapi::OutlookMessageFormat  format,
int32_t  codePage,
int32_t  count,
bool  preserveDates 
)
pure virtual

◆ Dispose() [1/2]

void Aspose::Email::AttachmentBase::Dispose ( )
override

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

◆ Dispose() [2/2]

virtual void Aspose::Email::AttachmentBase::Dispose ( bool  disposing)
protectedvirtual

Releases unmanaged and - optionally - managed resources.

Parameters
disposingtrue to release both managed and unmanaged resources; false to release only unmanaged resources.

Reimplemented in Aspose::Email::AlternateView.

◆ GenerateContentId()

virtual System::String Aspose::Email::AttachmentBase::GenerateContentId ( )
protectedvirtual

Generates the content id value.

Returns

Reimplemented in Aspose::Email::Attachment.

◆ get_ContentId()

System::String Aspose::Email::AttachmentBase::get_ContentId ( )

Gets the content id.

The content id.

◆ get_ContentLocation()

System::SharedPtr<System::Uri> Aspose::Email::AttachmentBase::get_ContentLocation ( ) const

Gets the content location.

The content location.

◆ get_ContentStream()

System::SharedPtr<System::IO::Stream> Aspose::Email::AttachmentBase::get_ContentStream ( )

Gets the content stream.

The content stream.

◆ get_ContentType()

System::SharedPtr<Aspose::Email::Mime::ContentType> Aspose::Email::AttachmentBase::get_ContentType ( )

Gets the type of the content.

The type of the content.

◆ get_Headers()

virtual System::SharedPtr<Mime::HeaderCollection> Aspose::Email::AttachmentBase::get_Headers ( )
virtual

Gets headers collection of attachment.

◆ get_Hidden()

bool Aspose::Email::AttachmentBase::get_Hidden ( )

◆ get_ItemId()

System::String Aspose::Email::AttachmentBase::get_ItemId ( ) const

◆ get_MimePart()

System::SharedPtr<Aspose::Email::Mime::MimePart> Aspose::Email::AttachmentBase::get_MimePart ( ) const

Gets the MIME part.

The MIME part.

◆ get_TransferEncoding()

Aspose::Email::Mime::TransferEncoding Aspose::Email::AttachmentBase::get_TransferEncoding ( )

Gets the transfer encoding.

The transfer encoding.

◆ GetEncodingFromContent()

static System::SharedPtr<System::Text::Encoding> Aspose::Email::AttachmentBase::GetEncodingFromContent ( System::String  contentString,
System::SharedPtr< Aspose::Email::Mime::ContentType contentType 
)
staticprotected

Defines Encoding from content.

Parameters
contentStringThe content string.
contentTypeThe content type.
Returns
Defined encodingSystem::Text::Encoding.

◆ PrepareForSending()

virtual void Aspose::Email::AttachmentBase::PrepareForSending ( )
virtual

Prepares for sending.

◆ Save() [1/2]

virtual void Aspose::Email::AttachmentBase::Save ( System::SharedPtr< System::IO::Stream >  stream)
virtual

Saves the specified stream.

Parameters
streamThe stream.

◆ Save() [2/2]

virtual void Aspose::Email::AttachmentBase::Save ( System::String  fileName)
virtual

Saves the specified file name.

Parameters
fileNameName of the file.

◆ SaveInternal()

virtual void Aspose::Email::AttachmentBase::SaveInternal ( System::SharedPtr< System::IO::Stream >  stream)
virtual

Saves the specified stream.

Parameters
streamThe stream.

◆ set_ContentId()

void Aspose::Email::AttachmentBase::set_ContentId ( System::String  value)

Sets the content id.

The content id.

◆ set_ContentLocation()

void Aspose::Email::AttachmentBase::set_ContentLocation ( System::SharedPtr< System::Uri >  value)

Sets the content location.

The content location.

◆ set_ContentStream()

void Aspose::Email::AttachmentBase::set_ContentStream ( System::SharedPtr< System::IO::Stream >  value)

Sets the content stream.

The content stream.

◆ set_ContentType()

void Aspose::Email::AttachmentBase::set_ContentType ( System::SharedPtr< Aspose::Email::Mime::ContentType value)

Sets the type of the content.

The type of the content.

◆ set_Hidden()

void Aspose::Email::AttachmentBase::set_Hidden ( bool  value)

◆ set_ItemId()

void Aspose::Email::AttachmentBase::set_ItemId ( System::String  value)

◆ set_MimePart()

void Aspose::Email::AttachmentBase::set_MimePart ( System::SharedPtr< Aspose::Email::Mime::MimePart >  value)

Sets the MIME part.

The MIME part.

◆ set_TransferEncoding()

void Aspose::Email::AttachmentBase::set_TransferEncoding ( Aspose::Email::Mime::TransferEncoding  value)

Sets the transfer encoding.

The transfer encoding.

◆ SetContentFromString() [1/3]

void Aspose::Email::AttachmentBase::SetContentFromString ( System::String  contentString,
System::SharedPtr< Aspose::Email::Mime::ContentType contentType 
)

Sets the content from string.

Parameters
contentStringThe content string.
contentTypeType of the content.

◆ SetContentFromString() [2/3]

void Aspose::Email::AttachmentBase::SetContentFromString ( System::String  contentString,
System::SharedPtr< System::Text::Encoding >  encoding,
System::SharedPtr< Aspose::Email::Mime::ContentType contentType,
Aspose::Email::Mime::TransferEncoding  te 
)

Sets the content from string.

Parameters
contentStringThe content string.
encodingThe encoding.
contentTypeThe content type.
teThe transfer encoding.

◆ SetContentFromString() [3/3]

void Aspose::Email::AttachmentBase::SetContentFromString ( System::String  contentString,
System::SharedPtr< System::Text::Encoding >  encoding,
System::String  mediaType 
)

Sets the content from string.

Parameters
contentStringThe content string.
encodingThe encoding.
mediaTypeType of the media.

◆ SetSTnefContent()

void Aspose::Email::AttachmentBase::SetSTnefContent ( System::ArrayPtr< uint8_t >  data)

Sets the S/TNEF content.

Parameters
dataThe thef data.

Friends And Related Function Documentation

◆ Aspose::Email::AlternateView

friend class Aspose::Email::AlternateView
friend

◆ Aspose::Email::Attachment

friend class Aspose::Email::Attachment
friend

◆ Aspose::Email::Calendar::Appointment

◆ Aspose::Email::Clients::Exchange::WebService::EWSClient2007

friend class Aspose::Email::Clients::Exchange::WebService::EWSClient2007
friend

◆ Aspose::Email::Clients::Exchange::WebService::Implementation::Appointments::Create::EwsClientAppointmentCreate

friend class Aspose::Email::Clients::Exchange::WebService::Implementation::Appointments::Create::EwsClientAppointmentCreate
friend

◆ Aspose::Email::Clients::Exchange::WebService::Implementation::Tasks::Create::EwsClientTaskCreate

friend class Aspose::Email::Clients::Exchange::WebService::Implementation::Tasks::Create::EwsClientTaskCreate
friend

◆ Aspose::Email::Clients::Graph::GraphClientV1

friend class Aspose::Email::Clients::Graph::GraphClientV1
friend

◆ Aspose::Email::Clients::Graph::V1::Commands::CreateMailAttachmentCommand

friend class Aspose::Email::Clients::Graph::V1::Commands::CreateMailAttachmentCommand
friend

◆ Aspose::Email::Clients::Graph::V1::Commands::ListMailAttachmentsCommand

friend class Aspose::Email::Clients::Graph::V1::Commands::ListMailAttachmentsCommand
friend

◆ Aspose::Email::Clients::Graph::V1::Model::TLFileAttachment

friend class Aspose::Email::Clients::Graph::V1::Model::TLFileAttachment
friend

◆ Aspose::Email::LinkedResource

friend class Aspose::Email::LinkedResource
friend

◆ Aspose::Email::MailMessage

friend class Aspose::Email::MailMessage
friend

◆ Aspose::Email::Mapi::MailMessageInterpretor

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

◆ Aspose::Email::Mapi::MapiMessage

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

◆ Aspose::Email::Mapi::OpaqueSignedMailMessageInterpretor

friend class Aspose::Email::Mapi::OpaqueSignedMailMessageInterpretor
friend

◆ Aspose::Email::Mapi::OutlookUtil

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

◆ Aspose::Email::Tnef::TnefAttachment

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

◆ Aspose::Email::Tools::ContactConverter

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

Member Data Documentation

◆ Disposed

bool Aspose::Email::AttachmentBase::Disposed

Is disposed.

◆ TnefAttachIndex

int32_t Aspose::Email::AttachmentBase::TnefAttachIndex