remove webdav references

This commit is contained in:
Chee Yee
2023-02-05 17:51:42 -08:00
parent eb936fab31
commit b683e37cef
35 changed files with 156 additions and 156 deletions
+5 -5
View File
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.0)
project(ps4_remote_client)
project(ezremote_client)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DDONT_HAVE_STRUPR")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive")
@@ -11,7 +11,7 @@ include_directories(
source/pugixml
)
add_executable(ps4_remote_client
add_executable(ezremote_client
source/pugixml/pugixml.cpp
source/webdav/callback.cpp
source/webdav/client.cpp
@@ -43,11 +43,11 @@ add_executable(ps4_remote_client
source/imgui.cpp
)
add_self(ps4_remote_client)
add_self(ezremote_client)
add_pkg(ps4_remote_client ${CMAKE_SOURCE_DIR}/data "RMTC00001" "PS4 Remote Client" "01.00" 32 0)
add_pkg(ezremote_client ${CMAKE_SOURCE_DIR}/data "RMTC00001" "ezRemote Client" "01.00" 32 0)
target_link_libraries(ps4_remote_client
target_link_libraries(ezremote_client
c
c++
png
+2 -2
View File
@@ -4,8 +4,8 @@ STR_LOCAL=محلي
STR_REMOTE=بعيد
STR_MESSAGES=الرسائل
STR_UPDATE_SOFTWARE=تحديث التطبيق
STR_CONNECT_WEBDAV=توصيل
STR_DISCONNECT_WEBDAV=قطع الاتصال
STR_CONNECT=توصيل
STR_DISCONNECT=قطع الاتصال
STR_SEARCH=بحث
STR_REFRESH=تحديث
STR_SERVER=الخادم
+2 -2
View File
@@ -4,8 +4,8 @@ STR_LOCAL=Local
STR_REMOTE=Remot
STR_MESSAGES=Missatges
STR_UPDATE_SOFTWARE=Actualització de programari
STR_CONNECT_WEBDAV=Connectar
STR_DISCONNECT_WEBDAV=Desconnectar
STR_CONNECT=Connectar
STR_DISCONNECT=Desconnectar
STR_SEARCH=Cercar
STR_REFRESH=Refrescar
STR_SERVER=Servidor
+2 -2
View File
@@ -4,8 +4,8 @@ STR_LOCAL=Lokalno
STR_REMOTE=Daljinsko
STR_MESSAGES=Poruke
STR_UPDATE_SOFTWARE=Ažuriranje softvera
STR_CONNECT_WEBDAV=Spajanje
STR_DISCONNECT_WEBDAV=Odspajanje
STR_CONNECT=Spajanje
STR_DISCONNECT=Odspajanje
STR_SEARCH=Pretražiti
STR_REFRESH=Osvježiti
STR_SERVER=Server
+2 -2
View File
@@ -4,8 +4,8 @@ STR_LOCAL=Lokaal
STR_REMOTE=Extern
STR_MESSAGES=Berichten
STR_UPDATE_SOFTWARE=Update Software
STR_CONNECT_WEBDAV=Verbind met
STR_DISCONNECT_WEBDAV=Verbreek verbinding met
STR_CONNECT=Verbind met
STR_DISCONNECT=Verbreek verbinding met
STR_SEARCH=Zoek
STR_REFRESH=Vernieuw
STR_SERVER=Server
+2 -2
View File
@@ -4,8 +4,8 @@ STR_LOCAL=Local
STR_REMOTE=Remote
STR_MESSAGES=Messages
STR_UPDATE_SOFTWARE=Update Software
STR_CONNECT_WEBDAV=Connect
STR_DISCONNECT_WEBDAV=Disconnect
STR_CONNECT=Connect
STR_DISCONNECT=Disconnect
STR_SEARCH=Search
STR_REFRESH=Refresh
STR_SERVER=Server
+2 -2
View File
@@ -4,8 +4,8 @@ STR_LOCAL=Lekuko
STR_REMOTE=Urrunekoa
STR_MESSAGES=Mezuak
STR_UPDATE_SOFTWARE=Eguneratu Softwarea
STR_CONNECT_WEBDAV=Konektatu
STR_DISCONNECT_WEBDAV=Deskonektatu
STR_CONNECT=Konektatu
STR_DISCONNECT=Deskonektatu
STR_SEARCH=Bilatu
STR_REFRESH=Freskatu
STR_SERVER=Zerbitzaria
+2 -2
View File
@@ -4,8 +4,8 @@ STR_LOCAL=Local
STR_REMOTE=A distance
STR_MESSAGES=Messages
STR_UPDATE_SOFTWARE=Mise à jour logicielle
STR_CONNECT_WEBDAV=Connexion
STR_DISCONNECT_WEBDAV=Déconnexion
STR_CONNECT=Connexion
STR_DISCONNECT=Déconnexion
STR_SEARCH=Rechercher
STR_REFRESH=Rafraîchir
STR_SERVER=Serveur
+2 -2
View File
@@ -4,8 +4,8 @@ STR_LOCAL=Local
STR_REMOTE=Remoto
STR_MESSAGES=Mensaxes
STR_UPDATE_SOFTWARE=Actualizar Software
STR_CONNECT_WEBDAV=Conectar
STR_DISCONNECT_WEBDAV=Desconectar
STR_CONNECT=Conectar
STR_DISCONNECT=Desconectar
STR_SEARCH=Busca
STR_REFRESH=Actualizar
STR_SERVER=Servidor
+2 -2
View File
@@ -4,8 +4,8 @@ STR_LOCAL=Lokal
STR_REMOTE=Remote
STR_MESSAGES=Nachrichten
STR_UPDATE_SOFTWARE=Software aktualisieren
STR_CONNECT_WEBDAV=Verbinde
STR_DISCONNECT_WEBDAV=Trenne
STR_CONNECT=Verbinde
STR_DISCONNECT=Trenne
STR_SEARCH=Suchen
STR_REFRESH=Aktualisieren
STR_SERVER=Server
+2 -2
View File
@@ -4,8 +4,8 @@ STR_LOCAL=Τοπικό
STR_REMOTE=Remote
STR_MESSAGES=Απομακρυσμένο
STR_UPDATE_SOFTWARE=Ενημέρωση Λογισμικού
STR_CONNECT_WEBDAV=Σύνδεση
STR_DISCONNECT_WEBDAV=Αποσύνδεση
STR_CONNECT=Σύνδεση
STR_DISCONNECT=Αποσύνδεση
STR_SEARCH=Αναζήτηση
STR_REFRESH=Ανανέωση
STR_SERVER=Διακομιστής
+2 -2
View File
@@ -4,8 +4,8 @@ STR_LOCAL=Helyi
STR_REMOTE=Távoli
STR_MESSAGES=Üzenetek
STR_UPDATE_SOFTWARE=Szoftver frissítés
STR_CONNECT_WEBDAV=Kapcsolódás
STR_DISCONNECT_WEBDAV=Szétkapcsol
STR_CONNECT=Kapcsolódás
STR_DISCONNECT=Szétkapcsol
STR_SEARCH=Keres
STR_REFRESH=Frissít
STR_SERVER=Szerver
+2 -2
View File
@@ -4,8 +4,8 @@ STR_LOCAL=Lokal
STR_REMOTE=Remote
STR_MESSAGES=Pesan
STR_UPDATE_SOFTWARE=Perbarui Software
STR_CONNECT_WEBDAV=Hubungkan
STR_DISCONNECT_WEBDAV=Putuskan
STR_CONNECT=Hubungkan
STR_DISCONNECT=Putuskan
STR_SEARCH=Cari
STR_REFRESH=Refresh
STR_SERVER=Server
+2 -2
View File
@@ -4,8 +4,8 @@ STR_LOCAL=Locale
STR_REMOTE=Remoto
STR_MESSAGES=Messaggi
STR_UPDATE_SOFTWARE=Aggiornamento di sistema
STR_CONNECT_WEBDAV=Connesione
STR_DISCONNECT_WEBDAV=Disconnetti da
STR_CONNECT=Connesione
STR_DISCONNECT=Disconnetti da
STR_SEARCH=Cerca
STR_REFRESH=Aggiorna
STR_SERVER=Server
+2 -2
View File
@@ -4,8 +4,8 @@ STR_LOCAL=ローカル
STR_REMOTE=リモート
STR_MESSAGES=メッセージ
STR_UPDATE_SOFTWARE=ソフトウェアの更新
STR_CONNECT_WEBDAV=に接続
STR_DISCONNECT_WEBDAV=を切断
STR_CONNECT=に接続
STR_DISCONNECT=を切断
STR_SEARCH=検索
STR_REFRESH=更新
STR_SERVER=サーバー
+2 -2
View File
@@ -4,8 +4,8 @@ STR_LOCAL=로컬
STR_REMOTE=리모트
STR_MESSAGES=메시지
STR_UPDATE_SOFTWARE=소프트웨어 업데이트
STR_CONNECT_WEBDAV=접속
STR_DISCONNECT_WEBDAV=끊기
STR_CONNECT=접속
STR_DISCONNECT=끊기
STR_SEARCH=검색
STR_REFRESH=새로고침
STR_SERVER=서버
+2 -2
View File
@@ -4,8 +4,8 @@ STR_LOCAL=Lokalny
STR_REMOTE=Zdalny
STR_MESSAGES=Wiadomości
STR_UPDATE_SOFTWARE=Aktualizuj aplikację
STR_CONNECT_WEBDAV=Połącz
STR_DISCONNECT_WEBDAV=Rozłącz
STR_CONNECT=Połącz
STR_DISCONNECT=Rozłącz
STR_SEARCH=Szukaj
STR_REFRESH=Odśwież
STR_SERVER=Serwer
+2 -2
View File
@@ -4,8 +4,8 @@ STR_LOCAL=Local
STR_REMOTE=Remoto
STR_MESSAGES=Mensagens
STR_UPDATE_SOFTWARE=Atualizar Software
STR_CONNECT_WEBDAV=Conectar
STR_DISCONNECT_WEBDAV=Desconectar
STR_CONNECT=Conectar
STR_DISCONNECT=Desconectar
STR_SEARCH=Pesquisar
STR_REFRESH=Recarregar
STR_SERVER=Servidor
+2 -2
View File
@@ -4,8 +4,8 @@ STR_LOCAL=Local
STR_REMOTE=Distant
STR_MESSAGES=Mesaje
STR_UPDATE_SOFTWARE=Update de aplicație
STR_CONNECT_WEBDAV=Conecteazăte
STR_DISCONNECT_WEBDAV=Deconecteazăte
STR_CONNECT=Conecteazăte
STR_DISCONNECT=Deconecteazăte
STR_SEARCH=Caută
STR_REFRESH=Reîncarca
STR_SERVER=Servere
+2 -2
View File
@@ -4,8 +4,8 @@ STR_LOCAL=Локальная
STR_REMOTE=Дистанционная
STR_MESSAGES=Сообщения
STR_UPDATE_SOFTWARE=Обновить Программу
STR_CONNECT_WEBDAV=Подключить
STR_DISCONNECT_WEBDAV=Отключить
STR_CONNECT=Подключить
STR_DISCONNECT=Отключить
STR_SEARCH=Найти
STR_REFRESH=Обновить
STR_SERVER=Сервер
+2 -2
View File
@@ -4,8 +4,8 @@ STR_LOCAL=ローカル
STR_REMOTE=リモート
STR_MESSAGES=メッセージ
STR_UPDATE_SOFTWARE=ソフトウェアぬ更新
STR_CONNECT_WEBDAV=んかい接続
STR_DISCONNECT_WEBDAV=切断
STR_CONNECT=んかい接続
STR_DISCONNECT=切断
STR_SEARCH=検索
STR_REFRESH=更新
STR_SERVER=サーバー
+2 -2
View File
@@ -4,8 +4,8 @@ STR_LOCAL=当地的
STR_REMOTE=偏僻的
STR_MESSAGES=留言
STR_UPDATE_SOFTWARE=更新软件
STR_CONNECT_WEBDAV=连接
STR_DISCONNECT_WEBDAV=断开
STR_CONNECT=连接
STR_DISCONNECT=断开
STR_SEARCH=搜索
STR_REFRESH=刷新
STR_SERVER=服务器
+2 -2
View File
@@ -4,8 +4,8 @@ STR_LOCAL=Local
STR_REMOTE=Remoto
STR_MESSAGES=Mensajes
STR_UPDATE_SOFTWARE=Actualizar software
STR_CONNECT_WEBDAV=Conectar
STR_DISCONNECT_WEBDAV=Desconectar
STR_CONNECT=Conectar
STR_DISCONNECT=Desconectar
STR_SEARCH=Buscar
STR_REFRESH=Actualizar
STR_SERVER=Servidor
+2 -2
View File
@@ -4,8 +4,8 @@ STR_LOCAL=ภายใน
STR_REMOTE=ระยะไกล
STR_MESSAGES=ข้อความ
STR_UPDATE_SOFTWARE=อัปเดตซอฟต์แวร์
STR_CONNECT_WEBDAV=เชื่อมต่อ
STR_DISCONNECT_WEBDAV=ยกเลิกการเชื่อมต่อ
STR_CONNECT=เชื่อมต่อ
STR_DISCONNECT=ยกเลิกการเชื่อมต่อ
STR_SEARCH=ค้นหา
STR_REFRESH=รีเฟรช
STR_SERVER=เซิร์ฟเวอร์
+2 -2
View File
@@ -4,8 +4,8 @@ STR_LOCAL=本地
STR_REMOTE=遠端
STR_MESSAGES=狀態
STR_UPDATE_SOFTWARE=更新版本
STR_CONNECT_WEBDAV=連接
STR_DISCONNECT_WEBDAV=中斷
STR_CONNECT=連接
STR_DISCONNECT=中斷
STR_SEARCH=搜尋
STR_REFRESH=重新整理
STR_SERVER=伺服器
+2 -2
View File
@@ -4,8 +4,8 @@ STR_LOCAL=Yerel
STR_REMOTE=Uzaktan
STR_MESSAGES=Mesajlar
STR_UPDATE_SOFTWARE=Yazılımı Güncelle
STR_CONNECT_WEBDAV=Bağlan
STR_DISCONNECT_WEBDAV=Bağlantıyı kes
STR_CONNECT=Bağlan
STR_DISCONNECT=Bağlantıyı kes
STR_SEARCH=Ara
STR_REFRESH=Yenile
STR_SERVER=Sunucu
Binary file not shown.

Before

Width:  |  Height:  |  Size: 350 KiB

After

Width:  |  Height:  |  Size: 256 KiB

+48 -48
View File
@@ -57,9 +57,9 @@ namespace Actions
void RefreshRemoteFiles(bool apply_filter)
{
if (!webdavclient->Ping())
if (!remoteclient->Ping())
{
webdavclient->Quit();
remoteclient->Quit();
sprintf(status_message, "%s", lang_strings[STR_CONNECTION_CLOSE_ERR_MSG]);
return;
}
@@ -69,7 +69,7 @@ namespace Actions
remote_files.clear();
if (strlen(remote_filter) > 0 && apply_filter)
{
std::vector<DirEntry> temp_files = webdavclient->ListDir(remote_directory);
std::vector<DirEntry> temp_files = remoteclient->ListDir(remote_directory);
std::string lower_filter = Util::ToLower(remote_filter);
for (std::vector<DirEntry>::iterator it = temp_files.begin(); it != temp_files.end();)
{
@@ -84,7 +84,7 @@ namespace Actions
}
else
{
remote_files = webdavclient->ListDir(remote_directory);
remote_files = remoteclient->ListDir(remote_directory);
}
FS::Sort(remote_files);
}
@@ -127,9 +127,9 @@ namespace Actions
if (!entry.isDir)
return;
if (!webdavclient->Ping())
if (!remoteclient->Ping())
{
webdavclient->Quit();
remoteclient->Quit();
sprintf(status_message, "%s", lang_strings[STR_CONNECTION_CLOSE_ERR_MSG]);
return;
}
@@ -202,15 +202,15 @@ namespace Actions
sprintf(status_message, "%s", "");
std::string folder = std::string(new_folder);
folder = Util::Rtrim(Util::Trim(folder, " "), "/");
std::string path = webdavclient->GetPath(remote_directory, folder.c_str());
if (webdavclient->Mkdir(path.c_str()))
std::string path = remoteclient->GetPath(remote_directory, folder.c_str());
if (remoteclient->Mkdir(path.c_str()))
{
RefreshRemoteFiles(false);
sprintf(remote_file_to_select, "%s", folder.c_str());
}
else
{
sprintf(status_message, "%s - %s", lang_strings[STR_FAILED], webdavclient->LastResponse());
sprintf(status_message, "%s - %s", lang_strings[STR_FAILED], remoteclient->LastResponse());
}
}
@@ -231,14 +231,14 @@ namespace Actions
std::string new_name = std::string(new_path);
new_name = Util::Rtrim(Util::Trim(new_name, " "), "/");
std::string path = FS::GetPath(remote_directory, new_name);
if (webdavclient->Rename(old_path, path.c_str()))
if (remoteclient->Rename(old_path, path.c_str()))
{
RefreshRemoteFiles(false);
sprintf(remote_file_to_select, "%s", new_name.c_str());
}
else
{
sprintf(status_message, "%s - %s", lang_strings[STR_FAILED], webdavclient->LastResponse());
sprintf(status_message, "%s - %s", lang_strings[STR_FAILED], remoteclient->LastResponse());
}
}
@@ -267,18 +267,18 @@ namespace Actions
void *DeleteSelectedRemotesFilesThread(void *argp)
{
if (webdavclient->Ping())
if (remoteclient->Ping())
{
for (std::set<DirEntry>::iterator it = multi_selected_remote_files.begin(); it != multi_selected_remote_files.end(); ++it)
{
if (it->isDir)
webdavclient->Rmdir(it->path, true);
remoteclient->Rmdir(it->path, true);
else
{
sprintf(activity_message, "%s %s", lang_strings[STR_DELETING], it->path);
if (!webdavclient->Delete(it->path))
if (!remoteclient->Delete(it->path))
{
sprintf(status_message, "%s - %s", lang_strings[STR_FAILED], webdavclient->LastResponse());
sprintf(status_message, "%s - %s", lang_strings[STR_FAILED], remoteclient->LastResponse());
}
}
}
@@ -287,7 +287,7 @@ namespace Actions
else
{
sprintf(status_message, "%s", lang_strings[STR_CONNECTION_CLOSE_ERR_MSG]);
DisconnectWebDav();
Disconnect();
}
activity_inprogess = false;
Windows::SetModalMode(false);
@@ -307,14 +307,14 @@ namespace Actions
int UploadFile(const char *src, const char *dest)
{
int ret;
if (!webdavclient->Ping())
if (!remoteclient->Ping())
{
webdavclient->Quit();
remoteclient->Quit();
sprintf(status_message, "%s", lang_strings[STR_CONNECTION_CLOSE_ERR_MSG]);
return 0;
}
if (overwrite_type == OVERWRITE_PROMPT && webdavclient->FileExists(dest))
if (overwrite_type == OVERWRITE_PROMPT && remoteclient->FileExists(dest))
{
sprintf(confirm_message, "%s %s?", lang_strings[STR_OVERWRITE], dest);
confirm_state = CONFIRM_WAIT;
@@ -327,7 +327,7 @@ namespace Actions
activity_inprogess = true;
selected_action = action_to_take;
}
else if (overwrite_type == OVERWRITE_NONE && webdavclient->FileExists(dest))
else if (overwrite_type == OVERWRITE_NONE && remoteclient->FileExists(dest))
{
confirm_state = CONFIRM_NO;
}
@@ -338,7 +338,7 @@ namespace Actions
if (confirm_state == CONFIRM_YES)
{
return webdavclient->Put(src, dest);
return remoteclient->Put(src, dest);
}
return 1;
@@ -354,7 +354,7 @@ namespace Actions
{
int err;
std::vector<DirEntry> entries = FS::ListDir(src.path, &err);
webdavclient->Mkdir(dest);
remoteclient->Mkdir(dest);
for (int i = 0; i < entries.size(); i++)
{
if (stop_activity)
@@ -369,7 +369,7 @@ namespace Actions
if (strcmp(entries[i].name, "..") == 0)
continue;
webdavclient->Mkdir(new_path);
remoteclient->Mkdir(new_path);
ret = Upload(entries[i], new_path);
if (ret <= 0)
{
@@ -453,9 +453,9 @@ namespace Actions
int DownloadFile(const char *src, const char *dest)
{
bytes_transfered = 0;
if (!webdavclient->Size(src, &bytes_to_download))
if (!remoteclient->Size(src, &bytes_to_download))
{
webdavclient->Quit();
remoteclient->Quit();
sprintf(status_message, "%s", lang_strings[STR_CONNECTION_CLOSE_ERR_MSG]);
return 0;
}
@@ -484,7 +484,7 @@ namespace Actions
if (confirm_state == CONFIRM_YES)
{
return webdavclient->Get(dest, src);
return remoteclient->Get(dest, src);
}
return 1;
@@ -499,7 +499,7 @@ namespace Actions
if (src.isDir)
{
int err;
std::vector<DirEntry> entries = webdavclient->ListDir(src.path);
std::vector<DirEntry> entries = remoteclient->ListDir(src.path);
FS::MkDirs(dest);
for (int i = 0; i < entries.size(); i++)
{
@@ -599,7 +599,7 @@ namespace Actions
int success = 0;
int skipped = 0;
WebDAV::WebDavClient *client = (WebDAV::WebDavClient *)client;
WebDAV::WebDavClient *client = (WebDAV::WebDavClient *)remoteclient;
for (std::set<DirEntry>::iterator it = multi_selected_remote_files.begin(); it != multi_selected_remote_files.end(); ++it)
{
if (stop_activity)
@@ -930,24 +930,24 @@ namespace Actions
}
}
void ConnectWebDav()
void Connect()
{
CONFIG::SaveConfig();
if (strncmp(webdav_settings->server, "https://", 8) == 0 || strncmp(webdav_settings->server, "http://", 7) == 0)
if (strncmp(remote_settings->server, "https://", 8) == 0 || strncmp(remote_settings->server, "http://", 7) == 0)
{
webdavclient = new WebDAV::WebDavClient();
remoteclient = new WebDAV::WebDavClient();
}
else if (strncmp(webdav_settings->server, "smb://", 6) == 0)
else if (strncmp(remote_settings->server, "smb://", 6) == 0)
{
webdavclient = new SmbClient();
remoteclient = new SmbClient();
}
else if (strncmp(webdav_settings->server, "ftp://", 6) == 0)
else if (strncmp(remote_settings->server, "ftp://", 6) == 0)
{
FtpClient *client = new FtpClient();
client->SetConnmode(FtpClient::pasv);
client->SetCallbackBytes(1);
client->SetCallbackXferFunction(FtpCallback);
webdavclient = client;
remoteclient = client;
int res = pthread_create(&ftp_keep_alive_thid, NULL, KeepAliveThread, NULL);
}
@@ -958,34 +958,34 @@ namespace Actions
return;
}
if (webdavclient->Connect(webdav_settings->server, webdav_settings->username, webdav_settings->password))
if (remoteclient->Connect(remote_settings->server, remote_settings->username, remote_settings->password))
{
RefreshRemoteFiles(false);
}
else
{
sprintf(status_message, "%s - %s", lang_strings[STR_FAIL_TIMEOUT_MSG], webdavclient->LastResponse());
if (webdavclient != nullptr)
sprintf(status_message, "%s - %s", lang_strings[STR_FAIL_TIMEOUT_MSG], remoteclient->LastResponse());
if (remoteclient != nullptr)
{
webdavclient->Quit();
delete webdavclient;
webdavclient = nullptr;
remoteclient->Quit();
delete remoteclient;
remoteclient = nullptr;
}
}
selected_action = ACTION_NONE;
}
void DisconnectWebDav()
void Disconnect()
{
if (webdavclient != nullptr)
if (remoteclient != nullptr)
{
if (webdavclient->IsConnected())
webdavclient->Quit();
if (remoteclient->IsConnected())
remoteclient->Quit();
multi_selected_remote_files.clear();
remote_files.clear();
sprintf(remote_directory, "%s", "/");
sprintf(status_message, "%s", "");
webdavclient = nullptr;
remoteclient = nullptr;
}
}
@@ -1010,9 +1010,9 @@ namespace Actions
void *KeepAliveThread(void *argp)
{
long idle;
while (webdavclient != nullptr && webdavclient->clientType() == CLIENT_TYPE_FTP && webdavclient->IsConnected())
while (remoteclient != nullptr && remoteclient->clientType() == CLIENT_TYPE_FTP && remoteclient->IsConnected())
{
FtpClient *client = (FtpClient*) webdavclient;
FtpClient *client = (FtpClient*) remoteclient;
idle = client->GetIdleTime();
if (idle > 60000000)
{
+5 -5
View File
@@ -32,9 +32,9 @@ enum ACTIONS
ACTION_REMOTE_SELECT_ALL,
ACTION_LOCAL_CLEAR_ALL,
ACTION_REMOTE_CLEAR_ALL,
ACTION_CONNECT_WEBDAV,
ACTION_DISCONNECT_WEBDAV,
ACTION_DISCONNECT_WEBDAV_AND_EXIT,
ACTION_CONNECT,
ACTION_DISCONNECT,
ACTION_DISCONNECT_AND_EXIT,
ACTION_INSTALL_REMOTE_PKG,
ACTION_INSTALL_LOCAL_PKG,
ACTION_INSTALL_URL_PKG
@@ -71,8 +71,8 @@ namespace Actions
void UploadFiles();
void *DownloadFilesThread(void *argp);
void DownloadFiles();
void ConnectWebDav();
void DisconnectWebDav();
void Connect();
void Disconnect();
void SelectAllLocalFiles();
void SelectAllRemoteFiles();
void *InstallRemotePkgsThread(void *argp);
+8 -8
View File
@@ -13,7 +13,7 @@ extern "C"
}
bool swap_xo;
WebDavSettings *webdav_settings;
RemoteSettings *remote_settings;
char local_directory[255];
char remote_directory[255];
char app_ver[6];
@@ -21,11 +21,11 @@ char last_site[32];
char display_site[32];
char language[128];
std::vector<std::string> sites;
std::map<std::string, WebDavSettings> site_settings;
std::map<std::string, RemoteSettings> site_settings;
char install_pkg_url[512];
char favorite_urls[MAX_FAVORITE_URLS][512];
bool auto_delete_tmp_pkg;
RemoteClient *webdavclient;
RemoteClient *remoteclient;
namespace CONFIG
{
@@ -57,7 +57,7 @@ namespace CONFIG
for (int i = 0; i < sites.size(); i++)
{
WebDavSettings setting;
RemoteSettings setting;
sprintf(setting.site_name, "%s", sites[i].c_str());
sprintf(setting.server, "%s", ReadString(sites[i].c_str(), CONFIG_WEBDAV_SERVER_IP, ""));
@@ -75,7 +75,7 @@ namespace CONFIG
sprintf(last_site, "%s", ReadString(CONFIG_GLOBAL, CONFIG_LAST_SITE, sites[0].c_str()));
WriteString(CONFIG_GLOBAL, CONFIG_LAST_SITE, last_site);
webdav_settings = &site_settings[std::string(last_site)];
remote_settings = &site_settings[std::string(last_site)];
for (int i = 0; i < MAX_FAVORITE_URLS; i++)
{
@@ -92,9 +92,9 @@ namespace CONFIG
{
OpenIniFile(CONFIG_INI_FILE);
WriteString(last_site, CONFIG_WEBDAV_SERVER_IP, webdav_settings->server);
WriteString(last_site, CONFIG_WEBDAV_SERVER_USER, webdav_settings->username);
WriteString(last_site, CONFIG_WEBDAV_SERVER_PASSWORD, webdav_settings->password);
WriteString(last_site, CONFIG_WEBDAV_SERVER_IP, remote_settings->server);
WriteString(last_site, CONFIG_WEBDAV_SERVER_USER, remote_settings->username);
WriteString(last_site, CONFIG_WEBDAV_SERVER_PASSWORD, remote_settings->password);
WriteString(CONFIG_GLOBAL, CONFIG_LAST_SITE, last_site);
WriteBool(CONFIG_GLOBAL, CONFIG_AUTO_DELETE_TMP_PKG, auto_delete_tmp_pkg);
WriteIniFile(CONFIG_INI_FILE);
+4 -4
View File
@@ -34,7 +34,7 @@
#define CONFIG_LANGUAGE "language"
struct WebDavSettings
struct RemoteSettings
{
char site_name[32];
char server[256];
@@ -43,15 +43,15 @@ struct WebDavSettings
};
extern std::vector<std::string> sites;
extern std::map<std::string, WebDavSettings> site_settings;
extern std::map<std::string, RemoteSettings> site_settings;
extern char local_directory[255];
extern char remote_directory[255];
extern char app_ver[6];
extern char last_site[32];
extern char display_site[32];
extern char language[128];
extern WebDavSettings *webdav_settings;
extern RemoteClient *webdavclient;
extern RemoteSettings *remote_settings;
extern RemoteClient *remoteclient;
extern char install_pkg_url[512];
extern char favorite_urls[MAX_FAVORITE_URLS][512];
extern bool auto_delete_tmp_pkg;
+1 -1
View File
@@ -98,7 +98,7 @@ namespace INSTALLER
int InstallRemotePkg(const char *filename, pkg_header *header)
{
std::string full_url = webdav_settings->server + std::string(filename);
std::string full_url = remote_settings->server + std::string(filename);
size_t scheme_pos = full_url.find("://");
size_t root_pos = full_url.find("/", scheme_pos+3);
std::string host = full_url.substr(0, root_pos);
+2 -2
View File
@@ -16,8 +16,8 @@ char lang_strings[LANG_STRINGS_NUM][LANG_STR_SIZE] = {
"Remote", // STR_REMOTE
"Messages", // STR_MESSAGES
"Update Software", // STR_UPDATE_SOFTWARE
"Connect", // STR_CONNECT_WEBDAV
"Disconnect", // STR_DISCONNECT_WEBDAV
"Connect", // STR_CONNECT
"Disconnect", // STR_DISCONNECT
"Search", // STR_SEARCH
"Refresh", // STR_REFRESH
"Server", // STR_SERVER
+2 -2
View File
@@ -10,8 +10,8 @@
FUNC(STR_REMOTE) \
FUNC(STR_MESSAGES) \
FUNC(STR_UPDATE_SOFTWARE) \
FUNC(STR_CONNECT_WEBDAV) \
FUNC(STR_DISCONNECT_WEBDAV) \
FUNC(STR_CONNECT) \
FUNC(STR_DISCONNECT) \
FUNC(STR_SEARCH) \
FUNC(STR_REFRESH) \
FUNC(STR_SERVER) \
+31 -31
View File
@@ -77,7 +77,7 @@ namespace Windows
void Init()
{
webdavclient = nullptr;
remoteclient = nullptr;
sprintf(local_file_to_select, "..");
sprintf(remote_file_to_select, "..");
@@ -142,7 +142,7 @@ namespace Windows
if (prev_down[SDL_CONTROLLER_BUTTON_START] && !cur_down[SDL_CONTROLLER_BUTTON_START] && !paused)
{
selected_action = ACTION_DISCONNECT_WEBDAV_AND_EXIT;
selected_action = ACTION_DISCONNECT_AND_EXIT;
}
prev_down[SDL_CONTROLLER_BUTTON_X] = cur_down[SDL_CONTROLLER_BUTTON_X];
@@ -161,7 +161,7 @@ namespace Windows
ImGuiStyle *style = &ImGui::GetStyle();
ImVec4 *colors = style->Colors;
static char title[64];
sprintf(title, "WebDAV %s", lang_strings[STR_CONNECTION_SETTINGS]);
sprintf(title, "ezRemote %s", lang_strings[STR_CONNECTION_SETTINGS]);
BeginGroupPanel(title, ImVec2(1905, 100));
ImGui::SetCursorPosY(ImGui::GetCursorPosY() + 10);
char id[256];
@@ -169,7 +169,7 @@ namespace Windows
ImVec2 pos;
ImGui::SetCursorPosX(ImGui::GetCursorPosX() + 4);
bool is_connected = webdavclient != nullptr && webdavclient->IsConnected();
bool is_connected = remoteclient != nullptr && remoteclient->IsConnected();
if (ImGui::IsWindowAppearing())
{
@@ -180,9 +180,9 @@ namespace Windows
ImGui::PushItemFlag(ImGuiItemFlags_Disabled, true);
ImGui::PushStyleVar(ImGuiStyleVar_Alpha, ImGui::GetStyle().Alpha * 0.3f);
}
if (ImGui::Button(lang_strings[STR_CONNECT_WEBDAV], ImVec2(180, 0)))
if (ImGui::Button(lang_strings[STR_CONNECT], ImVec2(180, 0)))
{
selected_action = ACTION_CONNECT_WEBDAV;
selected_action = ACTION_CONNECT;
}
if (is_connected)
{
@@ -192,7 +192,7 @@ namespace Windows
if (ImGui::IsItemHovered())
{
ImGui::BeginTooltip();
ImGui::Text("%s", lang_strings[STR_CONNECT_WEBDAV]);
ImGui::Text("%s", lang_strings[STR_CONNECT]);
ImGui::EndTooltip();
}
ImGui::SameLine();
@@ -202,9 +202,9 @@ namespace Windows
ImGui::PushItemFlag(ImGuiItemFlags_Disabled, true);
ImGui::PushStyleVar(ImGuiStyleVar_Alpha, ImGui::GetStyle().Alpha * 0.3f);
}
if (ImGui::Button(lang_strings[STR_DISCONNECT_WEBDAV], ImVec2(200, 0)))
if (ImGui::Button(lang_strings[STR_DISCONNECT], ImVec2(200, 0)))
{
selected_action = ACTION_DISCONNECT_WEBDAV;
selected_action = ACTION_DISCONNECT;
}
if (!is_connected)
{
@@ -214,7 +214,7 @@ namespace Windows
if (ImGui::IsItemHovered())
{
ImGui::BeginTooltip();
ImGui::Text("%s", lang_strings[STR_DISCONNECT_WEBDAV]);
ImGui::Text("%s", lang_strings[STR_DISCONNECT]);
ImGui::EndTooltip();
}
ImGui::SameLine();
@@ -231,7 +231,7 @@ namespace Windows
{
sprintf(last_site, "%s", sites[n].c_str());
sprintf(display_site, "%s", site_id);
webdav_settings = &site_settings[sites[n]];
remote_settings = &site_settings[sites[n]];
}
// Set the initial focus when opening the combo (scrolling + keyboard navigation focus)
@@ -243,15 +243,15 @@ namespace Windows
ImGui::SameLine();
ImGui::PushStyleVar(ImGuiStyleVar_ButtonTextAlign, ImVec2(0.0f, 1.0f));
sprintf(id, "%s##server", webdav_settings->server);
sprintf(id, "%s##server", remote_settings->server);
pos = ImGui::GetCursorPos();
if (ImGui::Button(id, ImVec2(650, 0)))
{
ime_single_field = webdav_settings->server;
ime_single_field = remote_settings->server;
ResetImeCallbacks();
ime_field_size = 255;
ime_callback = SingleValueImeCallback;
Dialog::initImeDialog(lang_strings[STR_SERVER], webdav_settings->server, 255, ORBIS_TYPE_BASIC_LATIN, pos.x, pos.y);
Dialog::initImeDialog(lang_strings[STR_SERVER], remote_settings->server, 255, ORBIS_TYPE_BASIC_LATIN, pos.x, pos.y);
gui_mode = GUI_MODE_IME;
}
ImGui::SameLine();
@@ -260,15 +260,15 @@ namespace Windows
ImGui::TextColored(colors[ImGuiCol_ButtonHovered], "%s:", lang_strings[STR_USERNAME]);
ImGui::SameLine();
sprintf(id, "%s##username", webdav_settings->username);
sprintf(id, "%s##username", remote_settings->username);
pos = ImGui::GetCursorPos();
if (ImGui::Button(id, ImVec2(180, 0)))
{
ime_single_field = webdav_settings->username;
ime_single_field = remote_settings->username;
ResetImeCallbacks();
ime_field_size = 32;
ime_callback = SingleValueImeCallback;
Dialog::initImeDialog(lang_strings[STR_USERNAME], webdav_settings->username, 32, ORBIS_TYPE_BASIC_LATIN, pos.x, pos.y);
Dialog::initImeDialog(lang_strings[STR_USERNAME], remote_settings->username, 32, ORBIS_TYPE_BASIC_LATIN, pos.x, pos.y);
gui_mode = GUI_MODE_IME;
}
ImGui::SameLine();
@@ -281,11 +281,11 @@ namespace Windows
pos = ImGui::GetCursorPos();
if (ImGui::Button(id, ImVec2(100, 0)))
{
ime_single_field = webdav_settings->password;
ime_single_field = remote_settings->password;
ResetImeCallbacks();
ime_field_size = 24;
ime_callback = SingleValueImeCallback;
Dialog::initImeDialog(lang_strings[STR_PASSWORD], webdav_settings->password, 24, ORBIS_TYPE_BASIC_LATIN, pos.x, pos.y);
Dialog::initImeDialog(lang_strings[STR_PASSWORD], remote_settings->password, 24, ORBIS_TYPE_BASIC_LATIN, pos.x, pos.y);
gui_mode = GUI_MODE_IME;
}
@@ -674,7 +674,7 @@ namespace Windows
flags = ImGuiSelectableFlags_Disabled;
if ((local_browser_selected && multi_selected_local_files.size() > 0) ||
(remote_browser_selected && multi_selected_remote_files.size() > 0 && webdavclient != nullptr))
(remote_browser_selected && multi_selected_remote_files.size() > 0 && remoteclient != nullptr))
flags = ImGuiSelectableFlags_None;
ImGui::PushID("Delete##settings");
if (ImGui::Selectable(lang_strings[STR_DELETE], false, flags | ImGuiSelectableFlags_DontClosePopups, ImVec2(220, 0)))
@@ -691,7 +691,7 @@ namespace Windows
flags = ImGuiSelectableFlags_Disabled;
if ((local_browser_selected && multi_selected_local_files.size() == 1) ||
(remote_browser_selected && multi_selected_remote_files.size() == 1 && webdavclient != nullptr))
(remote_browser_selected && multi_selected_remote_files.size() == 1 && remoteclient != nullptr))
flags = ImGuiSelectableFlags_None;
ImGui::PushID("Rename##settings");
if (ImGui::Selectable(lang_strings[STR_RENAME], false, flags | ImGuiSelectableFlags_DontClosePopups, ImVec2(220, 0)))
@@ -707,7 +707,7 @@ namespace Windows
ImGui::Separator();
flags = ImGuiSelectableFlags_Disabled;
if (local_browser_selected || (remote_browser_selected && webdavclient != nullptr))
if (local_browser_selected || (remote_browser_selected && remoteclient != nullptr))
flags = ImGuiSelectableFlags_None;
ImGui::PushID("New Folder##settings");
if (ImGui::Selectable(lang_strings[STR_NEW_FOLDER], false, flags | ImGuiSelectableFlags_DontClosePopups, ImVec2(220, 0)))
@@ -725,7 +725,7 @@ namespace Windows
flags = ImGuiSelectableFlags_Disabled;
if (local_browser_selected)
{
if (multi_selected_local_files.size() > 0 && webdavclient != nullptr)
if (multi_selected_local_files.size() > 0 && remoteclient != nullptr)
{
flags = ImGuiSelectableFlags_None;
}
@@ -755,7 +755,7 @@ namespace Windows
if (remote_browser_selected)
{
if (multi_selected_remote_files.size() > 0 && webdavclient != nullptr)
if (multi_selected_remote_files.size() > 0 && remoteclient != nullptr)
{
flags = ImGuiSelectableFlags_None;
}
@@ -772,7 +772,7 @@ namespace Windows
ImGui::Separator();
ImGui::PushID("Install##remote");
if (webdavclient != nullptr && webdavclient->clientType() != CLIENT_TYPE_WEBDAV)
if (remoteclient != nullptr && remoteclient->clientType() != CLIENT_TYPE_WEBDAV)
{
flags = ImGuiSelectableFlags_Disabled;
}
@@ -1244,14 +1244,14 @@ namespace Windows
multi_selected_remote_files.clear();
selected_action = ACTION_NONE;
break;
case ACTION_CONNECT_WEBDAV:
Actions::ConnectWebDav();
case ACTION_CONNECT:
Actions::Connect();
break;
case ACTION_DISCONNECT_WEBDAV:
Actions::DisconnectWebDav();
case ACTION_DISCONNECT:
Actions::Disconnect();
break;
case ACTION_DISCONNECT_WEBDAV_AND_EXIT:
Actions::DisconnectWebDav();
case ACTION_DISCONNECT_AND_EXIT:
Actions::Disconnect();
done = true;
break;
case ACTION_INSTALL_REMOTE_PKG: