/*******************************************************************

Copyright (c) 2004 Open Mobile Alliance, Ltd.  All Rights Reserved.

This software is made available under the usage and distribution terms 
covered by the Common Public License 1.0 and by using this software you
are bound by the terms and conditions of the same.

EXCEPT AS EXPRESSLY SET FORTH IN THE COMMON PUBLIC LICENSE,
THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, 
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 
EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, 
ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, 
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
   
Each recipient is solely responsible for determining the 
appropriateness of using and distributing this program and assumes 
all risks associated with its exercise of rights under the Common 
Public License, including but not limited to the risks and 
costs of program errors, compliance with applicable laws, 
damage to or loss of data, programs or equipment, and 
unavailability or interruption of operations.

********************************************************************/
#if !defined(AFX_DMACCOUNTPANE_H__E1C2C534_20B5_425D_A599_5CD8E023A442__INCLUDED_)
#define AFX_DMACCOUNTPANE_H__E1C2C534_20B5_425D_A599_5CD8E023A442__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// DMAccountPane.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// CDMAccountPane dialog
#include "SctsDevManDevice.h"

class CDMAccountPane : public CDialog
{
// Construction
public:

    typedef SctsDMDevice::MulDynAccItem MulDynAccItem;
    typedef SctsDMDevice::MDAccType MDAccType;
    typedef SctsDMTree::SctsDMNodePtrVec SctsDMNodePtrVec;

	CDMAccountPane(SctsDMTree *_tree,CWnd* pParent = NULL);   // standard constructor
	void UpdateNode(char *nodeName,CString *nodeValue,bool isNonce=false);

    /*
     * Change to support DM 1.2 DMAcc node. 
     */
	bool UpdateNode(const MulDynAccItem& dynAcc);

	void Refresh(MulDynAccItem *dynAcc);
	void Enable(BOOL enable);
	bool update;
	int currentItem;
	SctsDMTree *tree;

    SctsDMDevice *unkDev;
    SctsDMClientDevice *cliDev;
    SctsDMServerDevice *srvDev;
    char *dmAccPath;

// Dialog Data
	//{{AFX_DATA(CDMAccountPane)
	enum { IDD = IDD_DMACCPANE };
	CListCtrl	m_list;
	int		m_cauth;
	int		m_conref;
	CString	m_cpassword;
	CString	m_cuser;
	CString	m_port;
	int		m_sauth;
	CString	m_sid;
	CString	m_spassword;
	CString	m_addr;
	int		m_addrType;
	CString	m_name;
	//}}AFX_DATA


// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CDMAccountPane)
	public:
	virtual BOOL PreTranslateMessage(MSG* pMsg);
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:

	// Generated message map functions
	//{{AFX_MSG(CDMAccountPane)
	virtual BOOL OnInitDialog();
	afx_msg void OnDmaccapply();
	afx_msg void OnUpdate();
	afx_msg void OnItemchangedDmacclist(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnDmaccdiscard();
	afx_msg void OnDmaccconnect();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

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

#endif // !defined(AFX_DMACCOUNTPANE_H__E1C2C534_20B5_425D_A599_5CD8E023A442__INCLUDED_)
