PIString fix
git-svn-id: svn://db.shs.com.ru/pip@44 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -4,6 +4,8 @@
|
||||
#include "piscreentiles.h"
|
||||
#include "pipeer.h"
|
||||
#include "pisystemmonitor.h"
|
||||
#include "pidatatransfer.h"
|
||||
#include "pifiletransfer.h"
|
||||
#include "file_manager.h"
|
||||
|
||||
extern PISystemMonitor sys_mon;
|
||||
@@ -12,6 +14,7 @@ class Daemon: public PIPeer {
|
||||
PIOBJECT(Daemon)
|
||||
public:
|
||||
Daemon();
|
||||
~Daemon();
|
||||
|
||||
struct HostInfo {
|
||||
HostInfo() {
|
||||
@@ -52,14 +55,32 @@ public:
|
||||
private:
|
||||
enum PacketType {
|
||||
RequestHostInfo = 10,
|
||||
RequestChangeDir,
|
||||
|
||||
ReplyHostInfo = 20
|
||||
ReplyHostInfo = 20,
|
||||
ReplyChangeDir,
|
||||
|
||||
DataTransfer = 30
|
||||
|
||||
};
|
||||
|
||||
class Remote: public PIThread {
|
||||
public:
|
||||
Remote(const PIString & n = PIString()) {dt.setName(n); ft.setName(n); dir = PIDir::current();}
|
||||
void sendData(const PIByteArray & d) {_d = d; startOnce();}
|
||||
PIDir dir;
|
||||
PIDataTransfer dt;
|
||||
PIFileTransfer ft;
|
||||
PIByteArray _d;
|
||||
void run() {dt.send(_d);}
|
||||
};
|
||||
|
||||
EVENT_HANDLER2(void, tileEvent, PIScreenTile *, t, PIScreenTypes::TileEvent, e);
|
||||
EVENT_HANDLER1(void, keyEvent, PIKbdListener::KeyEvent, key);
|
||||
EVENT_HANDLER1(void, fmKeyEvent, PIKbdListener::KeyEvent, key);
|
||||
EVENT_HANDLER2(void, timerEvent, void * , _d, int, delim);
|
||||
EVENT_HANDLER1(void, dtSendRequest, PIByteArray &, data);
|
||||
EVENT_HANDLER1(void, dtReceived, bool, ok);
|
||||
EVENT(menuRequest);
|
||||
void hideAll();
|
||||
void showTile(PIScreenTile * t, const PIString & header = PIString());
|
||||
@@ -75,10 +96,13 @@ private:
|
||||
void tabFeature();
|
||||
void tabInfo();
|
||||
|
||||
void requestChDir(const PIString & d);
|
||||
|
||||
mutable PIStringList available_daemons;
|
||||
PITimer timer;
|
||||
PIString conn_name;
|
||||
PIMap<int, PIString> dnames;
|
||||
PIMap<PIString, Remote*> remotes;
|
||||
PISystemMonitor sys_mon_other;
|
||||
HostInfo info_my, info_other;
|
||||
FileManager fm;
|
||||
|
||||
Reference in New Issue
Block a user