//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
//
// CMPNT.H
// --------------------------------
// Component object definition
//
//

#ifndef __COMPNT_H__
#define __COMPNT_H__

#include <unknwn.h>
#include "iface.h"

//{{COMASPECT_COMPONENTDECL
#include "cimage.h"

class COMImage :	IImageInfo, IImageProcessing, IPersistence
{
	public:
		// IUnknown
		virtual HRESULT __stdcall QueryInterface(const IID& iid, void** ppv) ;
		virtual ULONG __stdcall AddRef() ;
		virtual ULONG __stdcall Release() ;

        //{{COMASPECT_COMPONENTINTERFACEDECL
     //IImageInfo
        virtual HRESULT __stdcall GetSize(int *Width, int *Height); 
        virtual HRESULT __stdcall GetPosition(int *X, int *Y); 

     //IImageProcessing
        virtual HRESULT __stdcall Rotate(int* result_arg, int AngleDegrees); 
        virtual HRESULT __stdcall Resize(int* result_arg, int Width, int Height); 

     //IPersistence
        virtual HRESULT __stdcall Load(int* result_arg, char *Filename); 
        virtual HRESULT __stdcall Save(int* result_arg, char *Filename); 


        //}}COMASPECT_COMPONENTINTERFACEDECL

        // 'struction
		COMImage();
		~COMImage();

		// generic factory creation
		static HRESULT CreateInstance(IUnknown* pOuterUnk, void ** ppvObject);
	private:
		long m_cRef;
        
        CImage *m_pObj;
};



//}}COMASPECT_COMPONENTDECL

#endif

