#pragma once
|
#include <functional>
|
#include <vector>
|
#include "IMcChannel.h"
|
|
#ifdef _COMPILE_AS_LIB
|
#warning "compiling as lib!"
|
#else
|
#ifdef _DEBUG
|
#ifndef _WIN64
|
#pragma comment(lib, "../McLibrarySDK/lib/Win32/Debug/McLibrary.lib")
|
#else
|
#pragma comment(lib, "../McLibrarySDK/lib/x64/Debug/McLibrary.lib")
|
#endif
|
#else
|
#ifndef _WIN64
|
#pragma comment(lib, "../McLibrarySDK/lib/Win32/Release/McLibrary.lib")
|
#else
|
#pragma comment(lib, "../McLibrarySDK/lib/x64/Release/McLibrary.lib")
|
#endif
|
#endif
|
#endif // !BUILD_AS_LIB
|
|
|
///////////////////////////////////////////////////////////////////////////////////
|
//// Define C linkage if using a C++ compiler
|
///////////////////////////////////////////////////////////////////////////////////
|
#ifdef __cplusplus
|
extern "C" {
|
#endif
|
|
///////////////////////////////////////////////////////////////////////////////////
|
//// Determine callling convention baesd on compiler
|
///////////////////////////////////////////////////////////////////////////////////
|
#ifdef __BORLANDC__
|
|
#ifdef __WIN32__
|
#define EXPORTED __declspec(dllexport) __stdcall
|
#else
|
#define EXPORTED FAR PASCAL __export
|
#endif // WIN32
|
|
#else // __BORLANDC__
|
|
|
#ifdef WIN32
|
#define EXPORTED __declspec(dllexport)
|
#else
|
#define EXPORTED FAR PASCAL __export
|
#endif // WIN32
|
|
#endif //__BORLANDC__
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////////
|
//// µ¼³öº¯Êý
|
////////////////////////////////////////////////////////////////////////////////////
|
int EXPORTED MCL_Initialize();
|
int EXPORTED MCL_Term();
|
int EXPORTED MCL_SetTimeout(int timeout);
|
int EXPORTED MCL_SetMaxActionSize(int actionSize);
|
int EXPORTED MCL_SetPacketSize(int size);
|
int EXPORTED MCL_CreateChannel(IMcChannel*& pChannel, const char* pszName, const char* pszIp,
|
const unsigned int nServerPort, const unsigned int nLocalPort = 0);
|
int EXPORTED MCL_DestroyChannel(const char* pszName);
|
int EXPORTED MCL_GetChannel(IMcChannel*& pChannel, const char* pszName);
|
int EXPORTED MCL_GetCmds(std::vector<std::string>& cmds);
|
int EXPORTED MCL_GetCmdString(IN MC::CMD cmd, OUT std::string& strCmd);
|
int EXPORTED MCL_GetCmd(IN std::string& strCmd, OUT MC::CMD& cmd);
|
int EXPORTED MCL_GetSubCmds(std::vector<std::string>& subCmds);
|
int EXPORTED MCL_GetSubCmdString(IN MC::SUBCMD subcmd, OUT std::string& strSubCmd);
|
int EXPORTED MCL_GetSubCmd(IN std::string& strSubCmd, OUT MC::SUBCMD& subcmd);
|
int EXPORTED MCL_GetSoftComponents(std::vector<std::string>& softComponents);
|
int EXPORTED MCL_GetSoftComponentString(std::vector<std::string>& softComponents);
|
int EXPORTED MCL_GetSoftComponent(IN std::string& strSoftComponent, OUT MC::SOFT_COMPONENT& softComponent);
|
int EXPORTED MCL_GetRawData(MC::CMD cmd, MC::SUBCMD subCmd, MC::SOFT_COMPONENT softComponent,
|
unsigned int firstAddr, int count, char* pszAttach, const unsigned int nAttachSize, char* pszBuffer, const unsigned int nBufferSize);
|
|
#ifdef __cplusplus
|
};
|
|
#endif //__cplusplus
|