diff --git a/.gitignore b/.gitignore deleted file mode 100644 index da8eb4f1..00000000 --- a/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -doc - diff --git a/src/core/picoremodule.h b/src/core/picoremodule.h index a245beb4..859bad09 100644 --- a/src/core/picoremodule.h +++ b/src/core/picoremodule.h @@ -26,5 +26,6 @@ #include "pistatemachine.h" #include "pitime.h" #include "pivariant.h" +#include "picli.h" #endif // PICOREMODULE_H diff --git a/src/io/piethernet.cpp b/src/io/piethernet.cpp index 52a73127..0b13f1f2 100755 --- a/src/io/piethernet.cpp +++ b/src/io/piethernet.cpp @@ -161,6 +161,7 @@ bool PIEthernet::init() { } if (params[PIEthernet::ReuseAddress]) ethSetsockoptBool(sock, SOL_SOCKET, SO_REUSEADDR); if (params[PIEthernet::Broadcast]) ethSetsockoptBool(sock, SOL_SOCKET, SO_BROADCAST); + if (type() == PIEthernet::TCP_Client) ethSetsockoptBool(sock, SOL_SOCKET, SO_KEEPALIVE); applyTimeouts(); applyOptInt(IPPROTO_IP, IP_TTL, TTL()); //cout << "inited " << sock << ": bc = " << params << endl; diff --git a/src/piversion.h b/src/piversion.h index a723eb63..9d8954ab 100644 --- a/src/piversion.h +++ b/src/piversion.h @@ -5,6 +5,6 @@ #define PIP_VERSION_MAJOR 0 #define PIP_VERSION_MINOR 5 #define PIP_VERSION_REVISION 0 -#define PIP_VERSION_SUFFIX "_alpha" +#define PIP_VERSION_SUFFIX "_beta" #endif // PIVERSION_H diff --git a/utils/system_daemon/daemon.cpp b/utils/system_daemon/daemon.cpp index 26c86a9e..a595e358 100644 --- a/utils/system_daemon/daemon.cpp +++ b/utils/system_daemon/daemon.cpp @@ -35,10 +35,14 @@ Daemon::Daemon(): PIPeer("_pisd_" + PISystemInfo::instance()->hostname + "_" + P tile_info = new TileSimple("daemon info"); tile_info->hide(); + tile_fm = fm.tile(); + tile_fm->hide(); + tile_root->addTile(tile_header); tile_root->addTile(list_daemons); tile_root->addTile(list_actions); tile_root->addTile(tile_info); + tile_root->addTile(tile_fm); CONNECTU(&screen, tileEvent, this, tileEvent) @@ -105,6 +109,7 @@ void Daemon::tileEvent(PIScreenTile * t, TileEvent e) { if (e.type == TileList::RowPressed) { switch (e.data.toInt()) { case 0: mode = 2; showTile(tile_info, "Information"); break; + case 1: mode = 3; showTile(tile_fm, "File manager"); break; default: break; } } diff --git a/utils/system_daemon/daemon.h b/utils/system_daemon/daemon.h index 2a3d2925..377d1b47 100644 --- a/utils/system_daemon/daemon.h +++ b/utils/system_daemon/daemon.h @@ -4,6 +4,7 @@ #include "piscreentiles.h" #include "pipeer.h" #include "pisystemmonitor.h" +#include "file_manager.h" extern PISystemMonitor sys_mon; @@ -80,8 +81,9 @@ private: PIMap dnames; PISystemMonitor sys_mon_other; HostInfo info_my, info_other; + FileManager fm; PIScreenTile * tile_root; - TileSimple * tile_info, * tile_header; + TileSimple * tile_info, * tile_fm, * tile_header; TileList * list_daemons, * list_actions; int mode, offset, cur, height; diff --git a/utils/system_daemon/file_manager.cpp b/utils/system_daemon/file_manager.cpp index a44cf1c6..850a1b14 100644 --- a/utils/system_daemon/file_manager.cpp +++ b/utils/system_daemon/file_manager.cpp @@ -1,5 +1,6 @@ #include "file_manager.h" #include "shared.h" +#include "daemon.h" extern PIScreen screen; @@ -130,9 +131,10 @@ void FileManager::TileDir::resizeEvent(int w, int h) { -FileManager::FileManager() { +FileManager::FileManager(Daemon * d) { setName("FileManager"); del_commit = false; + daemon = d; CONNECTU(&screen, keyPressed, this, keyEvent) //dir.setDir("/home/peri4/Documents"); TileSimple * tl; diff --git a/utils/system_daemon/file_manager.h b/utils/system_daemon/file_manager.h index 7b207d98..17a86d2c 100644 --- a/utils/system_daemon/file_manager.h +++ b/utils/system_daemon/file_manager.h @@ -4,10 +4,12 @@ #include "piscreentiles.h" #include "pidir.h" +class Daemon; + class FileManager: public PIObject { PIOBJECT(FileManager) public: - FileManager(); + FileManager(Daemon * d); PIScreenTile * tile() const; @@ -35,6 +37,7 @@ private: bool del_commit; TileDir * panels[2]; + Daemon * daemon; PIScreenTile * tile_root; PIStringList selected; typedef PIPair SSPair; diff --git a/utils/system_daemon/main.cpp b/utils/system_daemon/main.cpp index 7e2904a6..21b91d4c 100755 --- a/utils/system_daemon/main.cpp +++ b/utils/system_daemon/main.cpp @@ -32,8 +32,8 @@ _Init _pisd_init; PIScreen screen(false); PISystemMonitor sys_mon; -FileManager file_manager; Daemon daemon_; +FileManager file_manager(&daemon_); class MainMenu: public PITimer {