// wmsoapsvccp.h : main header file for the WMSOAPSVCCP application
//

#if !defined(AFX_WMSOAPSVCCP_H__642341D6_7F11_4001_A01B_12DCC5322F1C__INCLUDED_)
#define AFX_WMSOAPSVCCP_H__642341D6_7F11_4001_A01B_12DCC5322F1C__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#ifndef __AFXWIN_H__
	#error include 'stdafx.h' before including this file for PCH
#endif

#include "resource.h"		// main symbols
#include "..\soap_source\WMSOAPClient.h"

/////////////////////////////////////////////////////////////////////////////
// CWSSCPApp:
// See wmsoapsvccp.cpp for the implementation of this class
//

class WMWSDLParser;
class WMSOAPAutomationProxy;

#define MD5_HASH_SIZE 16

class CWSSCPApp : public CWinApp
{
public:
	CWSSCPApp();

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CWSSCPApp)
	public:
	virtual BOOL InitInstance();
	//}}AFX_VIRTUAL

	void OnHelpButton();

// Implementation
	void BuildRequestHeaders(bool bInitialMsg = false);
	void GetResponseHeaders();
	void BuildResponse();
	void BuildCN();
	bool AuthServer();
	const string& GetAuthStatus() { return m_strAuthStatus; }
    bool ReadSettings();
    bool WriteSettings();

    // authentication info
	string			    m_strRealm;
	string				m_strUID;
	string				m_strPassword;
	string				m_strAuthStatus;
	bool				m_bStaleNonce;
    string              m_strCN;
    string              m_strSN;
	unsigned char		m_RAuth[MD5_HASH_SIZE];
	unsigned char		m_Auth[MD5_HASH_SIZE];
    // path to xml config file
    string              m_strConfigFilePath;
    // proxy settings
    bool                m_bUseProxy;
    string              m_strProxyHost;
    int                 m_nProxyPort;

	// WSDL processor
	WMSOAPClient	m_SOAPClient;

	// from configuration file
	CString	        m_strHost;
	CString         m_strServiceName;
	CString         m_strPortName;
	int		        m_nPort;
    string          m_strSvcURI;
	bool		    m_bViewBuffers;

	//{{AFX_MSG(CWSSCPApp)
		// NOTE - the ClassWizard will add and remove member functions here.
		//    DO NOT EDIT what you see in these blocks of generated code !
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};


/////////////////////////////////////////////////////////////////////////////

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

#endif // !defined(AFX_WMSOAPSVCCP_H__642341D6_7F11_4001_A01B_12DCC5322F1C__INCLUDED_)
