#ifndef OpenTestSystem_OtxDiagManager_OtxDiagApi_IFlash_H
#define OpenTestSystem_OtxDiagManager_OtxDiagApi_IFlash_H

#include "ApiDefs.h"
#include "TypeDefs.h"
#include "OtxDataTypes/AllClasses.h"
#include "OtxDataTypes/OtxComChannelCategory.h"
#include "OtxDataTypes/OtxAudience.h"
#include "OtxDataTypes/OtxDirection.h"
#include "OtxDataTypes/OtxFlashFileFormat.h"
#include <string>
#include <memory>
#include <vector>

namespace OpenTestSystem {
	namespace OtxDiagManager {
		namespace OtxDiagApi {
			/// <summary>
			/// @snippetdoc DocSnippets.txt OtxDiagApiClassComment
			/// </summary>
			class API_EXPORTS IFlash
			{
			protected:
				IFlash() {}
			public:
				virtual ~IFlash() {};
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual std::vector<std::string> GetListOfValidFlashSessions(std::shared_ptr<OtxDataTypes::IOtxComChannel> comChannel, OtxDataTypes::OtxAudiences * audience, OtxDataTypes::OtxDirections direction) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual std::shared_ptr<OtxDataTypes::IOtxFlashSession> GetFlashSession(const std::string & sessionId) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual int64 GetNumberOfBlocks(std::shared_ptr<OtxDataTypes::IOtxFlashSession> session) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual int64 GetNumberOfSegments(std::shared_ptr<OtxDataTypes::IOtxFlashSession> session, double block) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual std::string GetLogicalBlockID(std::shared_ptr<OtxDataTypes::IOtxFlashSession> session, double block) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual bool BlockIsValidForAudience(std::shared_ptr<OtxDataTypes::IOtxFlashSession> session, double block, OtxDataTypes::OtxAudiences audience) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual int64 GetNumberOfOwnIdents(std::shared_ptr<OtxDataTypes::IOtxFlashSession> session, double block) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual std::string GetCompressionEncryption(std::shared_ptr<OtxDataTypes::IOtxFlashSession> session, double block) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual int64 GetNumberOfSecurities(std::shared_ptr<OtxDataTypes::IOtxFlashSession> session, double* block) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual std::string GetType(std::shared_ptr<OtxDataTypes::IOtxFlashSession> session, double block) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual int64 GetStartAddress(std::shared_ptr<OtxDataTypes::IOtxFlashSession> session, double block, double segment) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual int64 GetCompressedSize(std::shared_ptr<OtxDataTypes::IOtxFlashSession> session, double block, double segment) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual int64 GetUncompressedSize(std::shared_ptr<OtxDataTypes::IOtxFlashSession> session, double block, double segment) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual std::string GetSignature(std::shared_ptr<OtxDataTypes::IOtxFlashSession> session, double *block, double security) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual std::string GetValidity(std::shared_ptr<OtxDataTypes::IOtxFlashSession> session, double* block, double security) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual std::string GetChecksum(std::shared_ptr<OtxDataTypes::IOtxFlashSession> session, double* block, double security) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual std::string GetSecurityMethod(std::shared_ptr<OtxDataTypes::IOtxFlashSession> session, double* block, double security) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual std::string GetOwnIdentFromEcu(std::shared_ptr<OtxDataTypes::IOtxFlashSession> session, double block, double number) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual std::string GetOwnIdent(std::shared_ptr<OtxDataTypes::IOtxFlashSession> session, double block, double number) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual void GetDownloadData(std::shared_ptr<OtxDataTypes::IOtxFlashSession> session, double block, double segment, double position, double size, std::vector<unsigned char> & data) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual void SetFlashSession(std::shared_ptr<OtxDataTypes::IOtxFlashJob> flashJob, std::shared_ptr<OtxDataTypes::IOtxFlashSession> session) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual std::shared_ptr<OtxDataTypes::IOtxFlashJob> CreateFlashJob(std::shared_ptr<OtxDataTypes::IOtxComChannel> comChannel, std::shared_ptr<OtxDataTypes::IOtxFlashSession> session) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual std::shared_ptr<OtxDataTypes::IOtxFlashJob> CreateFlashJobByName(std::shared_ptr<OtxDataTypes::IOtxComChannel> comChannel, const std::string & name, std::shared_ptr<OtxDataTypes::IOtxFlashSession> session) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual std::shared_ptr<OtxDataTypes::IOtxFlashJob> CreateFlashJobBySemantic(std::shared_ptr<OtxDataTypes::IOtxComChannel> comChannel, const std::string & semantic, std::shared_ptr<OtxDataTypes::IOtxFlashSession> session) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual std::string GetFlashKey(std::shared_ptr<OtxDataTypes::IOtxFlashSession> session) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual std::string  GetSessionID(std::shared_ptr<OtxDataTypes::IOtxFlashSession> session) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual int64  GetSessionPriority(std::shared_ptr<OtxDataTypes::IOtxFlashSession> session) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual bool  IsDownloadSession(std::shared_ptr<OtxDataTypes::IOtxFlashSession> session) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual void  StoreUploadData(std::vector<unsigned char> data, const std::string & target, double address, OtxDataTypes::OtxFlashFileFormats format, bool append) = 0;
			};
		}
	}
}
#endif // OpenTestSystem_OtxDiagManager_OtxDiagApi_IFlash_H