[pkg-fso-commits] [SCM] FSO frameworkd Debian packaging branch, debian, updated. upstream/0.9.5.5-717-g0f98819

Sebastian Krzyszkowiak seba.dos1 at gmail.com
Sat Aug 6 08:18:09 UTC 2011


The following commit has been merged in the debian branch:
commit b3468181e8397caae915f0c825a12231563229b0
Author: Sebastian Krzyszkowiak <seba.dos1 at gmail.com>
Date:   Wed Aug 26 21:47:24 2009 +0200

    opimd: implement _initialized in backends

diff --git a/framework/subsystems/opimd/backend_manager.py b/framework/subsystems/opimd/backend_manager.py
index a963f60..89cf000 100644
--- a/framework/subsystems/opimd/backend_manager.py
+++ b/framework/subsystems/opimd/backend_manager.py
@@ -316,6 +316,8 @@ class BackendManager(DBusFBObject):
             domain = DomainManager._domains[domain_name]
             domain.remove_entries_from_backend(backend.name)
 
+        backend._initialized = False
+
     @dbus_method(_DIN_SOURCE, "s", "", rel_path_keyword="rel_path")
     def SetAsDefault(self, domain, rel_path):
         num_id = int(rel_path[1:])
diff --git a/framework/subsystems/opimd/docs/TODO b/framework/subsystems/opimd/docs/TODO
index 78003e9..baceaee 100644
--- a/framework/subsystems/opimd/docs/TODO
+++ b/framework/subsystems/opimd/docs/TODO
@@ -1,8 +1,7 @@
 Near future:
 * quering "Phone" should check also "Office phone"
-* sorting
 In mean-time:
-* Initialized, GetInitialized
+* Initialized signal in source
 After that:
 * finished inteligent queries (ContactDeleted, ConactUpdated)
 * updating with SIM-Messages-FSO
diff --git a/framework/subsystems/opimd/pimb_csv_contacts.py b/framework/subsystems/opimd/pimb_csv_contacts.py
index d8a226b..bb6b6cf 100644
--- a/framework/subsystems/opimd/pimb_csv_contacts.py
+++ b/framework/subsystems/opimd/pimb_csv_contacts.py
@@ -78,7 +78,8 @@ class CSVContactBackend(Backend):
     @tasklet.tasklet
     def load_entries(self):
         self.load_entries_from_file()
-        yield None
+        self._initialized = True
+        yield True
 
     def load_entries_from_file(self):
         """Loads all entries from disk"""
diff --git a/framework/subsystems/opimd/pimb_ogsmd_calls.py b/framework/subsystems/opimd/pimb_ogsmd_calls.py
index 51e6ac0..7863a8c 100644
--- a/framework/subsystems/opimd/pimb_ogsmd_calls.py
+++ b/framework/subsystems/opimd/pimb_ogsmd_calls.py
@@ -120,4 +120,5 @@ class OgsmdCallsBackend(Backend):
         if not self.handler:
             bus.add_signal_receiver(self.handle_call_status, signal_name='CallStatus', dbus_interface='org.freesmartphone.GSM.Call', bus_name='org.freesmartphone.ogsmd')
             self.handler = True
+        self._initialized = True
         yield True
diff --git a/framework/subsystems/opimd/pimb_sim_contacts_fso.py b/framework/subsystems/opimd/pimb_sim_contacts_fso.py
index 9867bee..765878b 100644
--- a/framework/subsystems/opimd/pimb_sim_contacts_fso.py
+++ b/framework/subsystems/opimd/pimb_sim_contacts_fso.py
@@ -167,6 +167,7 @@ class SIMContactBackendFSO(Backend):
             self.contact_book_info = yield tasklet.WaitDBus(self.gsm_sim_iface.GetPhonebookInfo,'contacts')
             logger.debug("process SIM contacts entries")
             self.process_entries(contacts)
+            self._initialized = True
                 
         except DBusException, e:
             logger.warning("%s: Could not request SIM phonebook from ogsmd : %s", self.name, e)
diff --git a/framework/subsystems/opimd/pimb_sim_messages_fso.py b/framework/subsystems/opimd/pimb_sim_messages_fso.py
index 70027b4..661815d 100644
--- a/framework/subsystems/opimd/pimb_sim_messages_fso.py
+++ b/framework/subsystems/opimd/pimb_sim_messages_fso.py
@@ -271,6 +271,7 @@ class SIMMessageBackendFSO(Backend):
             self.process_all_entries(entries)
 
             self.install_signal_handlers()
+            self._initialized = True
         except DBusException, e:
             logger.warning("%s: Could not request SIM messagebook from ogsmd (%s)", self.name, e)
             logger.info("%s: Waiting for SIM being ready...", self.name)
diff --git a/framework/subsystems/opimd/pimb_sqlite_calls.py b/framework/subsystems/opimd/pimb_sqlite_calls.py
index c052aca..fd92c30 100644
--- a/framework/subsystems/opimd/pimb_sqlite_calls.py
+++ b/framework/subsystems/opimd/pimb_sqlite_calls.py
@@ -110,7 +110,9 @@ class SQLiteCallBackend(Backend):
 
     @tasklet.tasklet
     def load_entries(self):
-        yield self.load_entries_from_db()
+        self.load_entries_from_db()
+        self._initialized = True
+        yield True
 
     def load_entries_from_db(self):
         """Loads all entries from db"""
diff --git a/framework/subsystems/opimd/pimb_sqlite_contacts.py b/framework/subsystems/opimd/pimb_sqlite_contacts.py
index 3b818b5..8ef2f96 100644
--- a/framework/subsystems/opimd/pimb_sqlite_contacts.py
+++ b/framework/subsystems/opimd/pimb_sqlite_contacts.py
@@ -151,7 +151,9 @@ class SQLiteContactBackend(Backend):
 
     @tasklet.tasklet
     def load_entries(self):
-        yield self.load_entries_from_db()
+        self.load_entries_from_db()
+        self._initialized = True
+        yield True
 
     def load_entries_from_db(self):
         """Loads all entries from db"""
diff --git a/framework/subsystems/opimd/pimb_sqlite_dates.py b/framework/subsystems/opimd/pimb_sqlite_dates.py
index 10b16c0..6c9f11f 100644
--- a/framework/subsystems/opimd/pimb_sqlite_dates.py
+++ b/framework/subsystems/opimd/pimb_sqlite_dates.py
@@ -105,7 +105,9 @@ class SQLiteDatesBackend(Backend):
 
     @tasklet.tasklet
     def load_entries(self):
-        yield self.load_entries_from_db()
+        self.load_entries_from_db()
+        self._initialized = True
+        yield True
 
     def load_entries_from_db(self):
         """Loads all entries from db"""
diff --git a/framework/subsystems/opimd/pimb_sqlite_messages.py b/framework/subsystems/opimd/pimb_sqlite_messages.py
index d978cc0..453c0ba 100644
--- a/framework/subsystems/opimd/pimb_sqlite_messages.py
+++ b/framework/subsystems/opimd/pimb_sqlite_messages.py
@@ -136,8 +136,9 @@ class SQLiteMessagesBackend(Backend):
 
     @tasklet.tasklet
     def load_entries(self):
-        yield self.load_entries_from_db()
-
+        self.load_entries_from_db()
+        self._initialized = True
+        yield True
 
     def load_entries_from_db(self):
         """Loads all entries from db"""
diff --git a/framework/subsystems/opimd/pimb_sqlite_notes.py b/framework/subsystems/opimd/pimb_sqlite_notes.py
index f660387..973da31 100644
--- a/framework/subsystems/opimd/pimb_sqlite_notes.py
+++ b/framework/subsystems/opimd/pimb_sqlite_notes.py
@@ -104,7 +104,9 @@ class SQLiteNotesBackend(Backend):
 
     @tasklet.tasklet
     def load_entries(self):
-        yield self.load_entries_from_db()
+        self.load_entries_from_db()
+        self._initialized = True
+        yield True
 
     def load_entries_from_db(self):
         """Loads all entries from db"""
diff --git a/framework/subsystems/opimd/pimb_sqlite_tasks.py b/framework/subsystems/opimd/pimb_sqlite_tasks.py
index 6a5b50c..928e927 100644
--- a/framework/subsystems/opimd/pimb_sqlite_tasks.py
+++ b/framework/subsystems/opimd/pimb_sqlite_tasks.py
@@ -106,7 +106,9 @@ class SQLiteTasksBackend(Backend):
 
     @tasklet.tasklet
     def load_entries(self):
-        yield self.load_entries_from_db()
+        self.load_entries_from_db()
+        self._initialized = True
+        yield True
 
     def load_entries_from_db(self):
         """Loads all entries from db"""

-- 
FSO frameworkd Debian packaging



More information about the pkg-fso-commits mailing list