#pragma once

#include "define.h"
#include <Windows.h>
#include "unit_test.h"

#include "namespace_start.h"

class CCookieGetResult{
	friend Void UnitTest();
private:
	Bool findFlag;
	browsertype::BrowserType browserType;
	resultcode::ResultCode resultCode;
	union ExtendCode{
		HRESULT hResult;
		int sqliteResult;
	};
	ExtendCode extendCode;
	//
	//セッター
	//
public:

	Void SetFindFlag(Bool findFlag);

	Void SetBrowserType(browsertype::BrowserType browserType);

	Void SetResultCode(resultcode::ResultCode resultCode);

	Void SetHResult(HRESULT hResult);

	Void SetSQLiteResult(int sqliteResult);


	//
	//ゲッター
	//
public:
	Bool IsFound()const;

	browsertype::BrowserType GetBrowserType()const;

	resultcode::ResultCode GetResultCode()const;

	ExtendCode GetExtendCode()const;

public:
	
	///
	///コンストラクタ
	///
	CCookieGetResult(browsertype::BrowserType bt);


	///
	///報告関数
	///
	Void Report();

};

static_assert(sizeof(CCookieGetResult) <= 8,"CCookieGetResult size error");





#include "namespace_end.h"