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

#include "mzstdxpsCommon.h"
#include "mzXmlDocument.h"
#include "mzObject.h"

class DECLSPEC_MZSTDXPS CXpsPrintTicket : public CXmlDocument {
public:
	WINAPI CXpsPrintTicket(CString xmlVersion = L"1.0", CString xmlEncoding = L"utf-8");
    virtual WINAPI ~CXpsPrintTicket();

    CXmlNode* WINAPI createParameter(CXmlNode* parentNode, CString parameterTag, CString paramName, CString paramValue);
    CXmlNode* WINAPI createParameter(CXmlNode* parentNode, CString parameterTag, CString paramName, CString paramValue, CString paramType = COMMON_EMPTY_STRING, CString paramNS = COMMON_EMPTY_STRING);
    CXmlNode* WINAPI createParameterInit(CXmlNode* parentNode, CString paramName, CString paramValue, CString paramType = COMMON_EMPTY_STRING, CString paramNS = COMMON_EMPTY_STRING);
    CXmlNode* WINAPI createScoredProperty(CXmlNode* parentNode, CString propertyName, CString propertyValue, CString propertyType = COMMON_EMPTY_STRING, CString propertyNS = COMMON_EMPTY_STRING);

    CXmlNode* WINAPI createFeature(CXmlNode* parentNode, CString featureName, CString featureNS);
    CXmlNode* WINAPI createFeatureWithOption(CXmlNode* parentNode, CString featureName, CString featureNS, CString optionName, CString optionNS);
    VOID WINAPI setFeatureOptionScoredProperty(CXmlNode* featureNode, CString optionName, CString optionNS, CString scoredPropertyName, CString scoredPropertyValue, CString scoredPropertyNS, CString scoredPropertyType = COMMON_EMPTY_STRING);

    CXmlNode* WINAPI createPageMediaSizeFeature(CXmlNode* parentNode, CString PageMediaSize, CString MediaSizeWidth, CString MediaSizeHeight);
    CXmlNode* WINAPI createResolutionFeature(CXmlNode* parentNode, CString PageResolutionX, CString PageResolutionY);
    CXmlNode* WINAPI createPageOutputColorFeature(CXmlNode* parentNode, INT DeviceBitsPerPixel, INT DriverBitsPerPixel);

    VOID WINAPI addPsfXmlns();
    VOID WINAPI addXsiXmlns();
    VOID WINAPI addXsdXmlns();
    VOID WINAPI addNs0000Xmlns();
    VOID WINAPI addPskXmlns();
    
private:
    CXmlNode* WINAPI _createValueNode(CXmlNode* parentNode, CString value, CString type = COMMON_EMPTY_STRING);
};

#endif
