rendered paste bodyIndex: raki/configdialogimpl.cpp
===================================================================
--- raki/configdialogimpl.cpp (revision 3011)
+++ raki/configdialogimpl.cpp (working copy)
@@ -239,7 +239,7 @@
dccmPath = "vdccm";
}
if (ipTables.isEmpty()) {
- ipTables = "/usr/sbin/iptables";
+ ipTables = "/sbin/iptables";
}
}
Index: raki/managerimpl.cpp
===================================================================
--- raki/managerimpl.cpp (revision 3011)
+++ raki/managerimpl.cpp (working copy)
@@ -21,6 +21,8 @@
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
***************************************************************************/
+#include <synce.h>
+
#include "managerimpl.h"
#include "rapiwrapper.h"
@@ -45,19 +47,15 @@
if (version->dwMajorVersion == 5) {
result = "Magneto: Windows Mobile 5";
} else if (version->dwMajorVersion == 4 &&
- version->dwMinorVersion == 20 &&
- version->dwBuildNumber == 1081) {
- result = "Ozone: Pocket PC 2003";
+ version->dwMinorVersion == 21) {
+ result = "Ozone: Windows Mobile 2003 SE";
+ } else if (version->dwMajorVersion == 4 &&
+ version->dwMinorVersion == 20) {
+ result = "Ozone: Windows Mobile 2003";
} else if (version->dwMajorVersion == 3 &&
version->dwMinorVersion == 0) {
- switch (version->dwBuildNumber) {
- case 9348:
- result = "Rapier: Pocket PC"; break;
- case 11171:
- result = "Merlin: Pocket PC 2002"; break;
- }
+ result = "Merlin: Pocket PC 2002";
}
-
return result;
}
@@ -304,17 +302,39 @@
msg = i18n("Uninstalling software ...");
postManagerImplEvent(&ManagerImpl::beginEvent, 0, noBlock);
- if(Ce::createProcess(QString("unload.exe").ucs2(),
+ if (Ce::createProcess(QString("unload.exe").ucs2(),
QString(item->text()).ucs2(), NULL, NULL, false, 0, NULL,
NULL, NULL, &info)) {
postManagerImplEvent(&ManagerImpl::uninstalledEvent, item, noBlock);
+ } else {
+ Ce::rapiUninit();
+ //kdDebug(2120) << i18n("Failed to start unload.exe, trying to uninstall via Configuration Service Provider ...") << endl;
+ char *configXML;
+ LPWSTR config = NULL;
+ DWORD flags = CONFIG_PROCESS_DOCUMENT;
+ LPWSTR reply = NULL;
+ HRESULT hr;
+ configXML = new char[512];
+ memset(configXML, 0, 512 * sizeof(char));
+ strcat(configXML, (char*)"<wap-provisioningdoc>\n\r<characteristic type=\"UnInstall\">\n\r<characteristic type=\"");
+ strcat(configXML, (char*)item->text().latin1());
+ strcat(configXML, (char*)"\">\n\r<parm name=\"uninstall\" value=\"1\"/>\n\r</characteristic>\n\r</characteristic>\n\r</wap-provisioningdoc>\n\r");
+
+ Ce::rapiInit(pdaName);
+ config = synce::wstr_from_current(configXML);
+ hr = Ce::ProcessConfig(config, flags, &reply);
+ if (SUCCEEDED(hr)) {
+ postManagerImplEvent(&ManagerImpl::uninstalledEvent, item, noBlock);
+ }
+ synce::CeRapiFreeBuffer(configXML);
+ synce::wstr_free_string(config);
+ synce::wstr_free_string(reply);
}
Ce::rapiUninit();
postManagerImplEvent(&ManagerImpl::endEvent, NULL, noBlock);
}
-
}
@@ -355,8 +375,6 @@
postManagerImplEvent(&ManagerImpl::endEvent, NULL, noBlock);
}
-
-
}
@@ -365,50 +383,48 @@
LONG result;
HKEY parent_key;
DWORD i;
+ bool smartphone = false;
if (Ce::rapiInit(pdaName)) {
msg = i18n("Retrieve software-list ...");
postManagerImplEvent(&ManagerImpl::beginEvent, 0, noBlock);
- result = synce::CeRegOpenKeyEx(HKEY_LOCAL_MACHINE,
- QString("Software\\Apps").ucs2(), 0, 0, &parent_key);
- if (ERROR_SUCCESS == result) {
- for (i = 0; !stopRequested(); i++) {
- WCHAR wide_name[MAX_PATH];
- DWORD name_size = sizeof(wide_name);
- HKEY program_key;
- DWORD installed = 0;
- DWORD value_size = sizeof(installed);
- DWORD type;
+ result = synce::CeRegOpenKeyEx(HKEY_LOCAL_MACHINE, QString("Security\\AppInstall").ucs2(), 0, 0, &parent_key);
+ if (ERROR_SUCCESS == result) smartphone = true;
+ else result = synce::CeRegOpenKeyEx(HKEY_LOCAL_MACHINE, QString("Software\\Apps").ucs2(), 0, 0, &parent_key);
- result = synce::CeRegEnumKeyEx(parent_key, i, wide_name,
- &name_size, NULL, NULL, NULL, NULL);
+ for (i = 0; !stopRequested(); i++) {
+ WCHAR wide_name[MAX_PATH];
+ DWORD name_size = sizeof(wide_name);
+ HKEY program_key;
+ DWORD installed = 0;
+ DWORD value_size = sizeof(installed);
+ DWORD type;
- if (ERROR_SUCCESS != result) {
- break;
- }
+ result = synce::CeRegEnumKeyEx(parent_key, i, wide_name, &name_size, NULL, NULL, NULL, NULL);
- result = synce::CeRegOpenKeyEx(parent_key, wide_name, 0, 0,
- &program_key);
+ if (ERROR_SUCCESS != result) {
+ break;
+ }
+ if (!smartphone) {
+ result = synce::CeRegOpenKeyEx(parent_key, wide_name, 0, 0, &program_key);
+
if (ERROR_SUCCESS != result) {
continue;
}
- result = synce::CeRegQueryValueEx(program_key,
- QString("Instl").ucs2(), NULL, &type,
- (LPBYTE)&installed, &value_size);
+ result = synce::CeRegQueryValueEx(program_key, QString("Instl").ucs2(), NULL, &type, (LPBYTE)&installed, &value_size);
+ }
- synce::CeRegCloseKey(program_key);
+ synce::CeRegCloseKey(program_key);
- if (ERROR_SUCCESS == result && installed) {
- postManagerImplEvent(&ManagerImpl::insertInstalledItemEvent,
- qstrdup(QString::fromUcs2(wide_name).ascii()),
- noBlock);
- }
+ if ((ERROR_SUCCESS == result && installed) || (ERROR_SUCCESS == result && smartphone)) {
+ postManagerImplEvent(&ManagerImpl::insertInstalledItemEvent, qstrdup(QString::fromUcs2(wide_name).ascii()), noBlock);
}
- synce::CeRegCloseKey(parent_key);
}
+ synce::CeRegCloseKey(parent_key);
+
Ce::rapiUninit();
postManagerImplEvent(&ManagerImpl::endEvent, NULL, noBlock);
@@ -469,3 +485,4 @@
RakiWorkerThread::rakiWorkerThread->stop();
startWorkerThread(this, &ManagerImpl::fetchSoftwareList, NULL);
}
+
Index: raki/installer.cpp
===================================================================
--- raki/installer.cpp (revision 3011)
+++ raki/installer.cpp (working copy)
@@ -26,6 +26,7 @@
#include "rakiworkerthread.h"
#include "pda.h"
+#include <string>
#include <qstringlist.h>
#include <kapplication.h>
#include <kcombobox.h>
@@ -41,6 +42,7 @@
QStringList Installer::installFiles;
QDict<PDA> *Installer::pdaList = NULL;
bool Installer::ready = true;
+std::string storage = "/Storage";
Installer::Installer(QWidget *parent, QDict<PDA> *pdaList)
: InstallDialog(parent)
@@ -132,7 +134,7 @@
PDA *pda = (PDA *) pdaList->find(pdaName);
if (pda != NULL) {
- dest = KURL("rapip://" + pdaName + "/Windows/AppMgr/Install/" +
+ dest = KURL("rapip://" + pdaName + storage + "/Windows/AppMgr/Install/" +
from.fileName());
pda->addURLByCopyJob((KIO::CopyJob *) job, dest);
}
@@ -170,35 +172,41 @@
#if KDE_VERSION < KDE_MAKE_VERSION(3,2,0) // KDE-3.1
- if (!KIO::NetAccess::exists("rapip://" + pdaName +
+ if (!KIO::NetAccess::exists("rapip://" + pdaName + "/Storage/Windows/AppMgr")) {
+ storage = "";
+ }
+ if (!KIO::NetAccess::exists("rapip://" + pdaName + storage +
"/Windows/AppMgr/Install")) {
- if (!KIO::NetAccess::exists("rapip://" + pdaName +
+ if (!KIO::NetAccess::exists("rapip://" + pdaName + storage +
"/Windows/AppMgr")) {
- mkdirSuccess = KIO::NetAccess::mkdir("rapip://" + pdaName +
+ mkdirSuccess = KIO::NetAccess::mkdir("rapip://" + pdaName + storage +
"/Windows/AppMgr");
}
if (mkdirSuccess) {
- mkdirSuccess = KIO::NetAccess::mkdir("rapip://" + pdaName +
+ mkdirSuccess = KIO::NetAccess::mkdir("rapip://" + pdaName + storage +
"/Windows/AppMgr/Install");
}
}
#else // KDE-3.2
- if (!KIO::NetAccess::exists("rapip://" + pdaName +
+ if (!KIO::NetAccess::exists("rapip://" + pdaName + "/Storage/Windows/AppMgr", false, NULL)) {
+ storage = "";
+ }
+ if (!KIO::NetAccess::exists("rapip://" + pdaName + storage +
"/Windows/AppMgr/Install", false, NULL)) {
- if (!KIO::NetAccess::exists("rapip://" + pdaName +
+ if (!KIO::NetAccess::exists("rapip://" + pdaName + storage +
"/Windows/AppMgr", false, NULL)) {
- mkdirSuccess = KIO::NetAccess::mkdir("rapip://" + pdaName +
+ mkdirSuccess = KIO::NetAccess::mkdir("rapip://" + pdaName + storage +
"/Windows/AppMgr", (QWidget *) NULL);
}
if (mkdirSuccess) {
- mkdirSuccess = KIO::NetAccess::mkdir("rapip://" + pdaName +
+ mkdirSuccess = KIO::NetAccess::mkdir("rapip://" + pdaName + storage +
"/Windows/AppMgr/Install", (QWidget *) NULL);
}
}
#endif
if (mkdirSuccess) {
- KIO::CopyJob *copyJob = KIO::copy(ul, KURL("rapip://" + pdaName +
+ KIO::CopyJob *copyJob = KIO::copy(ul, KURL("rapip://" + pdaName + storage +
"/Windows/AppMgr/Install/"), true);
connect(copyJob, SIGNAL(result(KIO::Job *)), installer,
SLOT(copyResult(KIO::Job *)));
Index: raki/rapiwrapper.h
===================================================================
--- raki/rapiwrapper.h (revision 3011)
+++ raki/rapiwrapper.h (working copy)
@@ -193,6 +193,22 @@
}
+ static HRESULT ProcessConfig(
+ LPCWSTR config,
+ DWORD flags,
+ LPWSTR* reply)
+ {
+ HRESULT hr;
+
+ hr = synce::CeProcessConfig(
+ config,
+ flags,
+ reply);
+
+ return hr;
+ }
+
+
static bool writeFile(
HANDLE hFile,
LPCVOID lpBuffer,
@@ -265,3 +281,4 @@
#endif
+
Index: TODO
===================================================================
--- TODO (revision 3011)
+++ TODO (working copy)
@@ -3,3 +3,20 @@
* Rewriting of the codebase
* Implement synchronizer for all Windows CE databases
+
+
+
+BUGs to fix
+===========
+-RAKI: fix software manager when more devices connected
+-RAKI: update version strings
+-RAPIP: allow capitals and spaces in phone name
+-VDCCM: allow connecting of second device after password protected device connected
+-VDCCM: connecting password protected WM6 devices
+
+BUGs fixed
+==========
+-RAKI: support fetching software list on WM2003
+-RAKI: support installing software on WM2003 (uploading to right folder)
+-RAKI: support uninstalling software using Configuration Service Provider
+-KCeMirror: F1 is no longer used for help