/*
 * ************************************************************************************************************
 * Author: Marcin Załęczny
 * Copyright (C)2011 Marcin Załęczny <mzaleczny@hotmail.com>
 * License: The GNU Lesser General Public License, version 3.0 (LGPLv3)
 * Library Name: mzstdprint
 * Version: 1.02
 * First release date:   2011-02-03
 * Current release date: 2011-03-04
 *
 *
 * This file is part of mzstdprint library
 * 
 * mzstdprint library is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * mzstdprint library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 * ************************************************************************************************************
 */

#ifndef __MZSTDPRINT_PRINTER_INFO_H__
#define __MZSTDPRINT_PRINTER_INFO_H__

#include "mzstdprintCommon.h"
#include "mzObject.h"
#include "mzString.h"
#include <winspool.h>


class DECLSPEC_MZSTDPRINT CPrinterInfo : public CObject {
public:
    CString name;
    CString serverName;
    CString shareName;
    CString portName;
    CString driverName;
    CString comment;
    CString location;
    CString sepFile;
    CString printProcessor;
    CString dataType;
    CString parameters;
    DWORD   flags;
    DWORD   attributes;
    DWORD   priority;
    DWORD   defaultPriority;
    DWORD   startTime;
    DWORD   untilTime;
    DWORD   status;
    DWORD   jobs;
    DWORD   averagePPM;
    DWORD   deviceNotSelectedTimeout;
    DWORD   transmissionRetryTimeout;
    CString description;
    
	WINAPI CPrinterInfo();
	WINAPI CPrinterInfo(PRINTER_INFO_1* info);
	WINAPI CPrinterInfo(PRINTER_INFO_2* info);
	WINAPI CPrinterInfo(PRINTER_INFO_4* info);
	WINAPI CPrinterInfo(PRINTER_INFO_5* info);
    virtual WINAPI ~CPrinterInfo();
    
    virtual CString WINAPI toString();
    VOID WINAPI reset();
    VOID WINAPI set(PRINTER_INFO_1* info);
    VOID WINAPI set(PRINTER_INFO_2* info);
    VOID WINAPI set(PRINTER_INFO_4* info);
    VOID WINAPI set(PRINTER_INFO_5* info);

protected:
    VOID WINAPI _commonInit();
};
typedef CPrinterInfo* PPrinterInfo;

#endif
