#if !defined(AFX_XAPIC_H__695180E7_1386_40CC_BA63_B931FDA2A685__INCLUDED_)
#define AFX_XAPIC_H__695180E7_1386_40CC_BA63_B931FDA2A685__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// XApic.h : header file
//

/////////////////////////////////////////////////////////////////////////////
// XApic dialog

class XApic : public CDialog
{
// Construction
public:
    XApic(CWnd* pParent = NULL);   // standard constructor

    HXAPI handle;
    XAPI_stateS LastState;

    void SetDigitsDisplay (CString);
    void XapiStateChange (PXAPI pxapi);
    void XapiDigitFromCallcontrol (unsigned char digit);
    void XapiDigitToCallcontrol (unsigned char digit);
    void XapiCallerId (const char * pCallerId);
    void XapiDisplay (const char * pDisplay);
    void XapiBdpStatus (BdpStatusS * pBdpStatus);
    unsigned BdpAccessCode;
    unsigned BdpStatus;
    void XapiTransferredCalls (const char **pTransferredCalls);
    void XapiSuspendedCalls (const char **pSuspendedCalls);

// Dialog Data
    //{{AFX_DATA(XApic)
    enum { IDD = IDD_XAPI_CLIENT };
	// NOTE: the ClassWizard will add data members here
//}}AFX_DATA


// Overrides
    // ClassWizard generated virtual function overrides
    //{{AFX_VIRTUAL(XApic)
    protected:
    virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
    //}}AFX_VIRTUAL

// Implementation
protected:
    void UpdateChargePulses (PXAPI pxapi);
    void UpdateCallMaintainButton (PXAPI pxapi);
    void UpdateHoldRetrieveButton (PXAPI pxapi);
    void UpdateSuspendButton (PXAPI pxapi);
    void UpdateConferenceButton (PXAPI pxapi);
    void UpdateCallbButton (PXAPI pxapi);
    void UpdateTransferButton (PXAPI pxapi);
    void UpdateRecordButton (PXAPI pxapi);
    void UpdateMailboxButton (PXAPI pxapi);
    void UpdateNotification (PXAPI pxapi);
    void UpdatePendingCalls (PXAPI pxapi);
    void UpdateTransferredCalls (PXAPI pxapi);
    void UpdateSuspendedCalls (PXAPI pxapi);
    void UpdateDeflect (PXAPI pxapi);
    void UpdateKeypad (BOOL enable);
    void UpdateBdpButtons (PXAPI pxapi);

    // Generated message map functions
    //{{AFX_MSG(XApic)
    afx_msg void OnClose();
    //}}AFX_MSG
    DECLARE_MESSAGE_MAP()
public:
    virtual BOOL PreTranslateMessage(MSG* pMsg);
    virtual void PostNcDestroy();
    afx_msg void OnShowWindow(BOOL bShow, UINT nStatus);
    CEdit m_charge_pulses;
    CEdit m_notification;
    CEdit m_pending_calls;
    CListBox m_digits;
    CButton m_call_maintain;
    CButton m_hold_etrieve;
    CButton m_suspend;
    CButton m_conference;
    CButton m_transfer;
    CButton m_record;
    CButton m_mailbox;
    CButton m_callb;
    CButton m_key1;
    CButton m_key0;
    CButton m_key2;
    CButton m_key3;
    CButton m_key4;
    CButton m_key5;
    CButton m_key6;
    CButton m_key7;
    CButton m_key8;
    CButton m_key9;
    CButton m_keysquare;
    CButton m_keystar;
    CListBox m_callerid;
    CListBox m_transferred_calls;
    CListBox m_suspended_calls;
    CEdit m_bdp;
    CButton m_intrude_bdp;
    CButton m_answer_bdp;
    CButton m_register_bdp;
    CEdit m_bdp_status;
    CEdit m_edit_deflect;
    CButton m_deflect;
    afx_msg void OnClickedButtonCallMaintain();
    afx_msg void OnClickedButtonKey0();
    afx_msg void OnClickedButtonKey1();
    afx_msg void OnClickedButtonKey2();
    afx_msg void OnClickedButtonKey3();
    afx_msg void OnClickedButtonKey4();
    afx_msg void OnClickedButtonKey5();
    afx_msg void OnClickedButtonKey6();
    afx_msg void OnClickedButtonKey7();
    afx_msg void OnClickedButtonKey8();
    afx_msg void OnClickedButtonKey9();
    afx_msg void OnClickedButtonKeysquare();
    afx_msg void OnClickedButtonKeystar();
    afx_msg void OnDblclkListCallerid();
    afx_msg void OnDblclkListTransferredCalls();
    afx_msg void OnChangeEditBdp();
    afx_msg void OnClickedButtonRegisterBdp();
    afx_msg void OnDblclkListSuspendedCalls();
    afx_msg void OnChangeEditDeflect();
    afx_msg void OnClickedButtonDeflect();
    afx_msg void OnClickedButtonIntrudeBdp();
    afx_msg void OnClickedButtonAnswerBdp();
    afx_msg void OnClickedButtonHoldRetrieve();
    afx_msg void OnClickedButtonSuspend();
    afx_msg void OnClickedButtonConference();
    afx_msg void OnClickedButtonTransfer();
    afx_msg void OnClickedButtonRecord();
    afx_msg void OnClickedButtonMailbox();
    afx_msg void OnClickedButtonCallb();
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_XAPIC_H__695180E7_1386_40CC_BA63_B931FDA2A685__INCLUDED_)
