#pragma once

/*
#include <winhttp.h>
#include <atlmem.h>
#include <boost\noncopyable.hpp>
#include "define.h"
#include "windowsAPI.h"


#include "namespace_start.h"



///
///ハンドル管理
///
class WinHttpHandle:public boost::noncopyable
{
public:
	WinHttpHandle();
    
	~WinHttpHandle();

    Bool Attach(HINTERNET handle);

	HINTERNET Detach();

    Void Close();

    CHResult SetOption(DWORD option,const Void* value,DWORD length);

    CHResult QueryOption(DWORD option,Void* value,DWORD& length) const;

    

    HINTERNET m_handle;
};


///
///セッション管理
///
class WinHttpSession : public WinHttpHandle
{
public:
	CHResult Initialize();
    
};


class WinHttpConnection : public WinHttpHandle
{
public:
	CHResult Initialize(PCWSTR serverName,INTERNET_PORT portNumber,const WinHttpSession& session);
   
};


//template <typename T>
class WinHttpRequest : public WinHttpHandle
{
public:
    CHResult Initialize(PCWSTR path,
                       __in_opt PCWSTR verb,
                       const WinHttpConnection& connection)
    {
		m_buffer.Allocate(8 * 1024);
        
		WinHttpOpenRequest(connection.m_handle,verb,
        // Call WinHttpOpenRequest and WinHttpSetStatusCallback.
    }

    CHResult SendRequest(__in_opt PCWSTR headers,
                        DWORD headersLength,
                        __in_opt const void* optional,
                        DWORD optionalLength,
                        DWORD totalLength)
    {
        T* pT = static_cast<T*>(this);

        // Call WinHttpSendRequest with pT as the context value.
    }

protected:
    static void CALLBACK Callback(HINTERNET handle,
                                  DWORD_PTR context,
                                  DWORD code,
                                  void* info,
                                  DWORD length)
    {
        if (0 != context)
        {
            T* pT = reinterpret_cast<T*>(context);

            HRESULT result = pT->OnCallback(code,
                                            info,
                                            length);

            if (FAILED(result))
            {
                pT->OnResponseComplete(result);
            }
        }
    }

    CHResult OnCallback(DWORD code,
                       const void* info,
                       DWORD length)
    {
         // Handle notifications here.
    }

    CGlobalHeap  m_buffer;
};
#include "namespace_end.h"
*/