40 #if (defined(_WIN32) && _MSC_VER >= 1600) || defined(__APPLE__) 41 #include <unordered_map> 43 #include <tr1/unordered_map> 46 #include "FileCoreProperties.h" 47 #include "FileContentType.h" 48 #include "FileRelationship.h" 60 #if (defined(_WIN32) && _MSC_VER >= 1600) || defined(__APPLE__) 61 typedef std::unordered_map<std::string, FilePart> PartMap;
63 typedef std::tr1::unordered_map<std::string, FilePart> PartMap;
70 void writeStringIntoNewPart(
const std::string &input,
const std::string & partPath);
72 static const char* CORE_PROP_REL_TYPE;
73 static const char* EXTENDED_CORE_PROP_REL_TYPE;
94 void openForWriting(
const std::string & pkgPathName,
bool useZip64 =
false);
100 std::vector<std::string>
openForReading(
const std::string & pkgPathName);
142 #if (defined(_WIN32) && _MSC_VER >= 1600) || defined(__APPLE__) 183 FilePart*
createPart(
const std::string & inputContent,
const std::string & outputPartPath);
193 bool fileExists(
const std::string & filename)
const;
198 std::string
extractFile(
const std::string & filename,
const std::string & password =
"");
void setPrincipalRelationship(const FileRelationship &pkgFileRS)
set the Relationships file.
Definition: Package.cpp:454
const FilePart * findPart(const std::string &outputPartPath) const
Find a part corresponding to the given path.
Definition: Package.cpp:472
const FileCoreProperties & getFileCoreProperties() const
Definition: Package.cpp:351
void openForWriting(const std::string &pkgPathName, bool useZip64=false)
Definition: Package.cpp:227
bool fileExists(const std::string &filename) const
Definition: Package.cpp:672
~Package()
Definition: Package.cpp:222
void close()
Definition: Package.cpp:346
Definition: ContentType.h:41
Package()
Definition: Package.cpp:212
Definition: FileRelationship.h:47
Definition: FileCoreProperties.h:41
void addProperty(const CoreProperty::TypeProperty &pkgTypeProperty, const std::string &pkgPropertyValue)
add a Property in the CoreProperties file of package.
Definition: Package.cpp:390
Definition: FilePart.h:42
const std::string & getPathname() const
Definition: Package.cpp:371
const FileContentType & getFileContentType() const
Definition: Package.cpp:356
std::vector< std::string > openForReading(const std::string &pkgPathName)
Definition: Package.cpp:253
FilePart * createPart(const std::string &inputContent, const std::string &outputPartPath)
Creates a part in the package and returns it. This part will be automatically destroy with the packag...
Definition: Package.cpp:464
std::string extractFile(const std::string &filename, const std::string &password="")
Definition: Package.cpp:680
TypeProperty
Definition: CoreProperty.h:49
Definition: ContentType.h:39
Definition: FileContentType.h:48
const FileRelationship & getPrincipalRelationship() const
Definition: Package.cpp:361
void setFileContentType(const FileContentType &pkgFileCT)
set the ContentTypes file.
Definition: Package.cpp:444
void addContentType(const ContentType &contentType)
add a ContentType in the ContentTypes file of package.
Definition: Package.cpp:449
Definition: Relationship.h:44
const PartMap & getAllFilePart() const
Definition: Package.cpp:366
void addRelationship(const Relationship &relationship)
add a Relationship in the Relationships file of package.
Definition: Package.cpp:459
std::tr1::unordered_map< std::string, std::string > & getExtendedCoreProperty()
Definition: Package.cpp:384
Definition: Package.cpp:149
void setFileFileCoreProperties(const FileCoreProperties &pkgFileCP)
set the CoreProperties file.
Definition: Package.cpp:376