git-svn-id: svn://db.shs.com.ru/libs@123 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#define CDUTILS_CORE_H
|
||||
|
||||
#include "cdutils_types.h"
|
||||
#include "cdutils_protocol.h"
|
||||
#include "piconnection.h"
|
||||
#include "pidatatransfer.h"
|
||||
|
||||
@@ -28,7 +29,9 @@ public:
|
||||
static CDCore * instance() {return __Core_Initializer__::__instance__;}
|
||||
|
||||
EVENT(K_Sended)
|
||||
EVENT(K_SendFail)
|
||||
EVENT(K_Received)
|
||||
EVENT(K_ReceiveFail)
|
||||
EVENT1(K_KeepNamesRequest, bool*, kn)
|
||||
EVENT_HANDLER(void, K_Send);
|
||||
EVENT_HANDLER(void, K_Request);
|
||||
@@ -39,16 +42,17 @@ public:
|
||||
void k_read(PIIODevice * d);
|
||||
void k_parse(PIIODevice * d);
|
||||
void k_update(PIIODevice * d);
|
||||
PIString pultConfig() {return PIString(pult_config);}
|
||||
PIString appConfig() {return PIString(app_config);}
|
||||
void reinitConnection(const PIString & configuration);
|
||||
bool inProgress() {return sendt.isRunning();}
|
||||
|
||||
private:
|
||||
CDCore(const char * conf =
|
||||
#ifdef CDPULT
|
||||
pult_config
|
||||
#else
|
||||
app_config
|
||||
#endif
|
||||
);
|
||||
CDCore();
|
||||
EVENT_HANDLER2(void, dataReceived, const PIString &, from, const PIByteArray &, data);
|
||||
EVENT_HANDLER1(void, dtSendRequest, PIByteArray &, data);
|
||||
EVENT_HANDLER1(void, dtReceiveFinished, bool, ok);
|
||||
EVENT_HANDLER(void, sendThread);
|
||||
void k_rec(const PIByteArray & data);
|
||||
void x_rec(const PIByteArray & data);
|
||||
void c_rec(const PIByteArray & data);
|
||||
@@ -56,7 +60,9 @@ private:
|
||||
static const char app_config[], pult_config[];
|
||||
PIConnection connection;
|
||||
PIDataTransfer datatr;
|
||||
|
||||
PacketHeader wheader;
|
||||
PIByteArray send_data;
|
||||
PIThread sendt;
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user