[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:17:55 UTC 2011


The following commit has been merged in the debian branch:
commit 28a7700860220ad54fdaf926c38df936a496cd49
Author: Sebastian Krzyszkowiak <seba.dos1 at gmail.com>
Date:   Wed Aug 19 23:27:24 2009 +0200

    opimd: Notes: add new domain

diff --git a/framework/subsystems/opimd/opimd.py b/framework/subsystems/opimd/opimd.py
index cb2d2a3..0fac96d 100644
--- a/framework/subsystems/opimd/opimd.py
+++ b/framework/subsystems/opimd/opimd.py
@@ -38,6 +38,7 @@ import pimd_contacts
 import pimd_messages
 import pimd_calls
 import pimd_dates
+import pimd_notes
 # Same thing for the backend modules
 import pimb_sim_contacts_fso
 import pimb_sim_messages_fso
diff --git a/framework/subsystems/opimd/pimd_contacts.py b/framework/subsystems/opimd/pimd_notes.py
similarity index 86%
copy from framework/subsystems/opimd/pimd_contacts.py
copy to framework/subsystems/opimd/pimd_notes.py
index 2cc2573..82abbf9 100644
--- a/framework/subsystems/opimd/pimd_contacts.py
+++ b/framework/subsystems/opimd/pimd_notes.py
@@ -9,9 +9,9 @@ Open PIM Daemon
 (C) 2009 Sebastian Krzyszkowiak <seba.dos1 at gmail.com>
 GPLv2 or later
 
-Contacts Domain Plugin
+Notes Domain Plugin
 
-Establishes the 'contacts' PIM domain and handles all related requests
+Establishes the 'Notes' PIM domain and handles all related requests
 """
 
 from dbus.service import FallbackObject as DBusFBObject
@@ -38,22 +38,22 @@ from pimd_generic import GenericEntry, GenericDomain
 
 #----------------------------------------------------------------------------#
 
-_DOMAIN_NAME = "Contacts"
+_DOMAIN_NAME = "Notes"
 
-_DBUS_PATH_CONTACTS = DBUS_PATH_BASE_FSO + '/' + _DOMAIN_NAME
-_DIN_CONTACTS_BASE = DIN_BASE_FSO
+_DBUS_PATH_NOTES = DBUS_PATH_BASE_FSO + '/' + _DOMAIN_NAME
+_DIN_NOTES_BASE = DIN_BASE_FSO
 
-_DBUS_PATH_QUERIES = _DBUS_PATH_CONTACTS + '/Queries'
+_DBUS_PATH_QUERIES = _DBUS_PATH_NOTES + '/Queries'
 
-_DIN_CONTACTS = _DIN_CONTACTS_BASE + '.' + 'Contacts'
-_DIN_ENTRY = _DIN_CONTACTS_BASE + '.' + 'Contact'
-_DIN_QUERY = _DIN_CONTACTS_BASE + '.' + 'ContactQuery'
+_DIN_NOTES = _DIN_NOTES_BASE + '.' + 'Notes'
+_DIN_ENTRY = _DIN_NOTES_BASE + '.' + 'Note'
+_DIN_QUERY = _DIN_NOTES_BASE + '.' + 'NoteQuery'
 
 
 #----------------------------------------------------------------------------#
-class Contact(GenericEntry):
+class Note(GenericEntry):
 #----------------------------------------------------------------------------#
-    """Represents one single contact with all the data fields it consists of.
+    """Represents one single note with all the data fields it consists of.
 
     _fields[n] = [field_name, field_value, value_used_for_comparison, source]
 
@@ -91,7 +91,7 @@ class QueryManager(DBusFBObject):
         DBusFBObject.__init__( self, conn=busmap["opimd"], object_path=_DBUS_PATH_QUERIES )
 
         # Still necessary?
-        self.interface = _DIN_CONTACTS
+        self.interface = _DIN_NOTES
         self.path = _DBUS_PATH_QUERIES
 
 
@@ -115,7 +115,7 @@ class QueryManager(DBusFBObject):
     def check_new_entry(self, entry_id):
         """Checks whether a newly added entry matches one or more queries so they can signal clients
 
-        @param entry_id Contact ID of the contact that was added"""
+        @param entry_id Note ID of the note that was added"""
 
         for (query_id, query_handler) in self._queries.items():
             if query_handler.check_new_entry(entry_id):
@@ -131,10 +131,10 @@ class QueryManager(DBusFBObject):
             raise InvalidQueryID( "Existing query IDs: %s" % self._queries.keys() )
 
     def EntryAdded(self, path, rel_path=None):
-        self.ContactAdded(path, rel_path=rel_path)
+        self.NoteAdded(path, rel_path=rel_path)
 
     @dbus_signal(_DIN_QUERY, "s", rel_path_keyword="rel_path")
-    def ContactAdded(self, path, rel_path=None):
+    def NoteAdded(self, path, rel_path=None):
         pass
 
     @dbus_method(_DIN_QUERY, "", "i", rel_path_keyword="rel_path")
@@ -162,7 +162,7 @@ class QueryManager(DBusFBObject):
 
 
     @dbus_method(_DIN_QUERY, "", "s", rel_path_keyword="rel_path", sender_keyword="sender")
-    def GetContactPath(self, rel_path, sender):
+    def GetNotePath(self, rel_path, sender):
         num_id = int(rel_path[1:])
         self.check_query_id_ok( num_id )
 
@@ -196,7 +196,7 @@ class QueryManager(DBusFBObject):
         self._queries.__delitem__(num_id)
 
 #----------------------------------------------------------------------------#
-class ContactDomain(Domain, GenericDomain):
+class NoteDomain(Domain, GenericDomain):
 #----------------------------------------------------------------------------#
     name = _DOMAIN_NAME
 
@@ -207,9 +207,9 @@ class ContactDomain(Domain, GenericDomain):
     Entry = None
 
     def __init__(self):
-        """Creates a new ContactDomain instance"""
+        """Creates a new NoteDomain instance"""
 
-        self.Entry = Contact
+        self.Entry = Note
 
         self._backends = {}
         self._entries = []
@@ -220,8 +220,8 @@ class ContactDomain(Domain, GenericDomain):
         Domain.__init__( self, conn=busmap["opimd"], object_path=DBUS_PATH_BASE_FSO + '/' + self.name )
 
         # Keep frameworkd happy
-        self.interface = _DIN_CONTACTS
-        self.path = _DBUS_PATH_CONTACTS
+        self.interface = _DIN_NOTES
+        self.path = _DBUS_PATH_NOTES
 
  
     #---------------------------------------------------------------------#
@@ -229,13 +229,13 @@ class ContactDomain(Domain, GenericDomain):
     #---------------------------------------------------------------------#
 
     def NewEntry(self, path):
-        self.NewContact(path)
+        self.NewNote(path)
 
-    @dbus_signal(_DIN_CONTACTS, "s")
-    def NewContact(self, path):
+    @dbus_signal(_DIN_NOTES, "s")
+    def NewNote(self, path):
         pass
 
-    @dbus_method(_DIN_CONTACTS, "a{sv}", "s")
+    @dbus_method(_DIN_NOTES, "a{sv}", "s")
     def Add(self, entry_data):
         """Adds a entry to the list, assigning it to the default backend and saving it
 
@@ -244,7 +244,7 @@ class ContactDomain(Domain, GenericDomain):
 
         return self.add(entry_data)
 
-    @dbus_method(_DIN_CONTACTS, "a{sv}s", "s")
+    @dbus_method(_DIN_NOTES, "a{sv}s", "s")
     def GetSingleEntrySingleField(self, query, field_name):
         """Returns the first entry found for a query, making it real easy to query simple things
 
@@ -254,7 +254,7 @@ class ContactDomain(Domain, GenericDomain):
 
         return self.get_single_entry_single_field(query, field_name)
 
-    @dbus_method(_DIN_CONTACTS, "a{sv}", "s", sender_keyword="sender")
+    @dbus_method(_DIN_NOTES, "a{sv}", "s", sender_keyword="sender")
     def Query(self, query, sender):
         """Processes a query and returns the dbus path of the resulting query object
 
@@ -290,11 +290,11 @@ class ContactDomain(Domain, GenericDomain):
         return self.get_multiple_fields(num_id, field_list)
 
     @dbus_signal(_DIN_ENTRY, "", rel_path_keyword="rel_path")
-    def ContactDeleted(self, rel_path=None):
+    def NoteDeleted(self, rel_path=None):
         pass
 
     def EntryDeleted(self, rel_path=None):
-        self.ContactDeleted(rel_path=rel_path)
+        self.NoteDeleted(rel_path=rel_path)
 
     @dbus_method(_DIN_ENTRY, "", "", rel_path_keyword="rel_path")
     def Delete(self, rel_path):
@@ -303,10 +303,10 @@ class ContactDomain(Domain, GenericDomain):
         self.delete(num_id)
 
     def EntryUpdated(self, data, rel_path=None):
-        self.ContactUpdated(data, rel_path=rel_path)
+        self.NoteUpdated(data, rel_path=rel_path)
 
     @dbus_signal(_DIN_ENTRY, "a{sv}", rel_path_keyword="rel_path")
-    def ContactUpdated(self, data, rel_path=None):
+    def NoteUpdated(self, data, rel_path=None):
         pass
 
     @dbus_method(_DIN_ENTRY, "a{sv}", "", rel_path_keyword="rel_path")

-- 
FSO frameworkd Debian packaging



More information about the pkg-fso-commits mailing list