#ifndef __KDDI_IIRREMOTECONTROLLER_H__
#define __KDDI_IIRREMOTECONTROLLER_H__

#ifndef IIRREMOTECONTROLLER_BID
#define IIRREMOTECONTROLLER_BID

#define AEECLSID_IIRREMOTECONTROLLER    	0x01014c53

#endif //IIRREMOTECONTROLLER_BID


typedef enum {
	IRREMOTECONTROLLER_CODETYPE_HL,
	IRREMOTECONTROLLER_CODETYPE_LH
} IrRemoteControllerCodeType;

typedef struct {
	int headerHighDuration;
	int headerLowDuration;
	int endHighDuration;
	int frameDuration;
	int repetition;
	char *pData;
	int bitLen;
} IrRemoteControllerFrameInfo;

typedef struct {
	int carrierHighDuration;
	int carrierLowDuration;
	int code0HighDuration;
	int code0LowDuration;
	IrRemoteControllerCodeType code0pattern;
 	int code1HighDuration;
	int code1LowDuration;
	IrRemoteControllerCodeType code1pattern;
} IrRemoteControllerSignalInfo;

typedef struct _IIrRemoteController IIrRemoteController;

AEEINTERFACE(IIrRemoteController)
{
	INHERIT_IBase(IIrRemoteController);
	
	int 		(*Callback_Init)	(IIrRemoteController *pIIrRemoteController, 
									AEECallback *pcb, PFNNOTIFY pfn, void *pd);
	int 		(*SetSignalInfo)	(IIrRemoteController *pIIrRemoteController,
									IrRemoteControllerSignalInfo *pSignalInfo);
	int			(*Send)				(IIrRemoteController *pIIrRemoteController,
									IrRemoteControllerFrameInfo *pFrameInfo,
									int numOfFrames, int blockRepetition, AEECallback *pcb );
	void		(*Stop)				(IIrRemoteController *pIIrRemoteController);
};

#define IIRREMOTECONTROLLER_AddRef(p)                           \
    AEEGETPVTBL((p),IIrRemoteController)->AddRef((p))
    
#define IIRREMOTECONTROLLER_Release(p)                          \
    AEEGETPVTBL((p),IIrRemoteController)->Release((p))
    
#define IIRREMOTECONTROLLER_CALLBACK_Init(p, pcb, pfn, pd)      \
    AEEGETPVTBL((p),IIrRemoteController)->Callback_Init((p), (pcb), (pfn), (pd))
    
#define IIRREMOTECONTROLLER_SetSignalInfo(p, pi)                \
    AEEGETPVTBL((p),IIrRemoteController)->SetSignalInfo((p), (pi))
    
#define IIRREMOTECONTROLLER_Send(p, pf, pn, pb, pcb )           \
    AEEGETPVTBL((p),IIrRemoteController)->Send((p), (pf), (pn), (pb), (pcb))
    
#define IIRREMOTECONTROLLER_Stop(p)                             \
    AEEGETPVTBL((p),IIrRemoteController)->Stop((p))

#endif  /*__KDDI_IIRREMOTECONTROLLER_H__*/