HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
UT_MIME Class Reference

#include <UT_MIME.h>

Classes

struct  TextFilter
 

Public Types

typedef bool(* TextFilterFunc )(const UT_WorkBuffer &in_data, UT_WorkBuffer &out_data, void *filter_data)
 
typedef UT_StringMap< TextFilterTextFilterList
 

Public Member Functions

 UT_MIME ()
 
virtual ~UT_MIME ()
 
UT_MIME_Status open (UT_IStream &is)
 
UT_MIME_Status readPart (UT_IStream &is, UT_String &path, UT_WorkBuffer &data, exint *modtime=nullptr, const char *ext_src=nullptr)
 
void close (UT_IStream &is)
 
void open (std::ostream &os, const char *boundaryText=nullptr)
 
void writePart (std::ostream &os, const UT_StringHolder &path, const UT_WorkBuffer &data, const exint modtime=-1)
 Create a new MIME part in the file with the data specified. More...
 
void writeExternalReference (std::ostream &os, const UT_StringHolder &path, const exint modtime=-1)
 Create a new MIME part in the file to indicate externally stored data. More...
 
void close (std::ostream &os)
 
const UT_WorkBuffergetBoundaryText () const
 

Static Public Member Functions

static bool filter (UT_IStream &is, std::ostream &os, const char *inclusions, const char *exclusions, const TextFilterList *filters=nullptr)
 
static bool StatusOK (UT_MIME_Status status)
 Returns true for any non-error status. More...
 
static UT_MIME_Status getAllExternalRefs (UT_IStream &is, UT_StringArray &external_files, const char *ext_src=nullptr)
 
static UT_MIME_Status getAllExternalRefs (const UT_StringHolder &filename, UT_StringArray &external_files, const char *ext_src=nullptr)
 

Static Public Attributes

static const char *const theDefaultBoundaryString
 

Detailed Description

Definition at line 39 of file UT_MIME.h.

Member Typedef Documentation

typedef bool(* UT_MIME::TextFilterFunc)(const UT_WorkBuffer &in_data, UT_WorkBuffer &out_data, void *filter_data)

Definition at line 82 of file UT_MIME.h.

Definition at line 96 of file UT_MIME.h.

Constructor & Destructor Documentation

UT_MIME::UT_MIME ( )
virtual UT_MIME::~UT_MIME ( )
virtual

Member Function Documentation

void UT_MIME::close ( UT_IStream is)
inline

Definition at line 60 of file UT_MIME.h.

void UT_MIME::close ( std::ostream &  os)
static bool UT_MIME::filter ( UT_IStream is,
std::ostream &  os,
const char *  inclusions,
const char *  exclusions,
const TextFilterList filters = nullptr 
)
static
static UT_MIME_Status UT_MIME::getAllExternalRefs ( UT_IStream is,
UT_StringArray external_files,
const char *  ext_src = nullptr 
)
static

Return a list of all the files stored externally from this MIME file. 'external_src' is optionally the directory the files are stored in.

static UT_MIME_Status UT_MIME::getAllExternalRefs ( const UT_StringHolder filename,
UT_StringArray external_files,
const char *  ext_src = nullptr 
)
static

Return a list of all the files stored externally from this MIME file. 'external_src' is optionally the directory the files are stored in.

const UT_WorkBuffer& UT_MIME::getBoundaryText ( ) const
inline

Definition at line 111 of file UT_MIME.h.

UT_MIME_Status UT_MIME::open ( UT_IStream is)
void UT_MIME::open ( std::ostream &  os,
const char *  boundaryText = nullptr 
)
UT_MIME_Status UT_MIME::readPart ( UT_IStream is,
UT_String path,
UT_WorkBuffer data,
exint modtime = nullptr,
const char *  ext_src = nullptr 
)

Read the next part of the MIME file. 'external_src' is optionally the directory the external files are stored in. If this is not specified then UT_MIME_EXTERNAL_OK is returned for parts that are stored externally. If the external can be read its contents will be placed in 'data'.

static bool UT_MIME::StatusOK ( UT_MIME_Status  status)
static

Returns true for any non-error status.

void UT_MIME::writeExternalReference ( std::ostream &  os,
const UT_StringHolder path,
const exint  modtime = -1 
)

Create a new MIME part in the file to indicate externally stored data.

void UT_MIME::writePart ( std::ostream &  os,
const UT_StringHolder path,
const UT_WorkBuffer data,
const exint  modtime = -1 
)

Create a new MIME part in the file with the data specified.

Member Data Documentation

const char* const UT_MIME::theDefaultBoundaryString
static

Definition at line 124 of file UT_MIME.h.


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