Log In
New Account
  
Home My Page Project Cloud Code Snippets Project Openings Hermes
Summary Lists News SCM
authorFredrik Wendt <fredrik@wendt.se>
Sat, 5 Jun 2010 21:27:46 +0000 (23:27 +0200)
committerFredrik Wendt <fredrik@wendt.se>
Sat, 5 Jun 2010 21:27:46 +0000 (23:27 +0200)
Signed-off-by: Fredrik Wendt <fredrik@wendt.se>

package/src/org/maemo/hermes/engine/syncjob.py [new file with mode: 0644]

diff --git a/package/src/org/maemo/hermes/engine/syncjob.py b/package/src/org/maemo/hermes/engine/syncjob.py
new file mode 100644 (file)
index 0000000..19ee3c8
--- /dev/null
@@ -0,0 +1,26 @@
+#!/usr/bin/env python
+
+class Syncjob():
+
+    def __init__(self, services, originalContacts):
+        self._services = services
+        self._originalContacts = originalContacts
+        
+    def run(self):
+        self._pre_process_contacts()
+        self._process_friends()
+        self._process_contacts()
+        
+    def _pre_process_contacts(self):
+        for contact in self._originalContacts:
+            for service in self._services:
+                service.pre_process_contact(contact)
+    
+    def _process_friends(self):
+        for service in self._services:
+            service.process_friends()
+    
+    def _process_contacts(self):
+        for contact in self._originalContacts:
+            for service in self._services:
+                service.process_contact(contact)    

Terms of Use    Privacy Policy    Contribution Guidelines    Feedback

Powered By GForge Collaborative Development Environment