// ************************************************************************************************************
// Author: Marcin Załęczny
// Release Date: 2010-11-08
// Licence: The GNU Lesser General Public License, version 3.0 (LGPLv3)
// ************************************************************************************************************
#ifndef __MZSTDXPS_XPS_PACKAGE_H__
#define __MZSTDXPS_XPS_PACKAGE_H__

#include "mzstdxpsCommon.h"
#include "mzObject.h"
#include "mzString.h"
#include "mzArrayList.h"

#include "mzXpsRelationships.h"
#include "mzXpsContentTypes.h"
#include "mzXpsFixedDocumentSequence.h"
#include "mzXpsMetadata.h"
#include "mzXpsDocument.h"


class DECLSPEC_MZSTDXPS CXpsPackage : public CObject {
public:
	WINAPI CXpsPackage();
    virtual WINAPI ~CXpsPackage();

    BOOL WINAPI saveToFile(CString fname, BOOL deleteTempXPSDirectoryStructure = TRUE);
    CXpsDocument* WINAPI addDocument();
    CXpsDocument* WINAPI getDocument(UINT i);
    VOID WINAPI removeAllDocuments();
    
protected:
    CXpsRelationships* _rels;                               // File 'XPS_HOME/_rels/.rels'
    CXpsRelationships* _fixedDocumentSequenceFdseqRel;      // File 'XPS_HOME/_rels/FixedDocumentSequence.fdseq.rels'

    CXpsContentTypes* _contentTypes;                        // File 'XPS_HOME/[Content_Types].xml'
    CXpsFixedDocumentSequence* _fixedDocumentSequenceFdseq; // File 'XPS_HOME/_rels/FixedDocumentSequence.fdseq.rels'
    
    CXpsMetadata* _metadata;                                // Set of files in 'XPS_HOME/Metadata'
    
    CArrayList* _documents;                                 // Set of documents: files in 'XPS_HOME/Documents'
};

#endif
