[conduit/syncml: 77/244] Add configuration stuff to HttpClientProvider
- From: John Carr <johncarr src gnome org>
- To: svn-commits-list gnome org
- Subject: [conduit/syncml: 77/244] Add configuration stuff to HttpClientProvider
- Date: Thu, 21 May 2009 05:51:49 -0400 (EDT)
commit 9a58a81ac774984c1572da2539d3b8179188d1b0
Author: John Carr <john carr unrouted co uk>
Date: Fri Apr 24 02:38:41 2009 -0700
Add configuration stuff to HttpClientProvider
---
conduit/modules/SyncmlModule/SyncmlModule.py | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/conduit/modules/SyncmlModule/SyncmlModule.py b/conduit/modules/SyncmlModule/SyncmlModule.py
index 04518ba..a9350e4 100644
--- a/conduit/modules/SyncmlModule/SyncmlModule.py
+++ b/conduit/modules/SyncmlModule/SyncmlModule.py
@@ -240,6 +240,15 @@ class SyncmlDataProvider(DataProvider.TwoWay):
class HttpClientProvider(SyncmlDataProvider):
+ _configurable_ = True
+
+ def __init__(self, address):
+ self.update_configuration(
+ username = "",
+ password = ""
+ )
+ SyncmlDataProvider.__init__(self, address)
+
def _setup_connection(self):
err = pysyncml.Error()
self.syncobj = pysyncml.SyncObject.new(enums.SML_SESSION_TYPE_CLIENT, enums.SML_TRANSPORT_HTTP_CLIENT, pysyncml.byref(err))
@@ -247,6 +256,16 @@ class HttpClientProvider(SyncmlDataProvider):
self._session_type = enums.SML_SESSION_TYPE_CLIENT
+ def config_setup(self, config):
+ config.add_section("Account details")
+ config.add_item("Login", "text",
+ config_name = "username"
+ )
+ config.add_item("Password", "text",
+ config_name = "password",
+ password = True
+ )
+
class BluetoothClient(SyncmlDataProvider):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]