123456789101112131415161718192021222324252627282930313233343536373839 |
- #pragma once
- #include "stdafx.h"
- #ifdef SYNCSERVICE_EXPORTS
- #define SYNCSERVICE_API __declspec( dllexport )
- #else
- #define SYNCSERVICE_API __declspec(dllimport)
- #pragma comment(lib, "SyncService.lib")
- #endif
- #ifdef __cplusplus
- extern "C" {
- #endif
- SYNCSERVICE_API int StartSyncService(char * szAddr,int nPort);
- SYNCSERVICE_API int StopSyncService();
- SYNCSERVICE_API int RefreshWindow();
- struct ISyncControl
- {
- virtual BOOL Start() = 0;
- virtual BOOL Stop() = 0;
- };
- typedef void (*OnRecvPacket)(int sub_type, const void *buf, int size, void *user_data);
- struct INetCommunication
- {
- virtual BOOL Send(int sub_type, const void *buf, int size) = 0;
- virtual BOOL RegisterRecvCB(OnRecvPacket cb, void *user_data) = 0;
- virtual void OnAgentInput() = 0;
- };
- SYNCSERVICE_API ISyncControl* GetControlObject(INetCommunication *pComm, HWND hWndBrowser);
- SYNCSERVICE_API void FreeControlObject(ISyncControl* pControl);
- #ifdef __cplusplus
- }
- #endif
|