~zeitgeist/zeitgeist-explorer/git-import

« back to all changes in this revision

Viewing changes to zgexplorer/remote.py

  • Committer: Manish Sinha
  • Date: 2013-07-13 04:17:03 UTC
  • Revision ID: git-v1:db5ffbaf540bd08be62f68a801bcec60d7ca9057
The Event for the Datasource is shown

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
DESTINATION = 'org.gnome.zeitgeist.Engine'
29
29
PATH        = '/org/gnome/zeitgeist/data_source_registry'
30
30
INTERFACE   = 'org.gnome.zeitgeist.DataSourceRegistry'
31
 
METHOD      = 'GetDataSources'
32
 
ARGS        = None
33
 
ANSWER_TYPE  = GLib.VariantType.new ('(a(sssa(asaasay)bxb))')
34
31
PROXY_PROPERTY = Gio.DBusCallFlags.NONE
35
32
TIMEOUT     = -1
36
33
CANCELLABLE = None
37
34
 
 
35
GETALL_METHOD  = 'GetDataSources'
 
36
GETALL_ARGS        = None
 
37
GETALL_ANSWER_TYPE  = GLib.VariantType.new ('(a(sssa(asaasay)bxb))')
 
38
 
 
39
 
38
40
class DataSourceProxy:
39
41
    
40
42
    def __init__(self):
41
43
        self.bus = Gio.bus_get_sync(Gio.BusType.SESSION, None)
42
44
        
43
45
    def get_data_sources(self):
44
 
        reply = self.bus.call_sync(DESTINATION, PATH, INTERFACE,METHOD, \
45
 
            ARGS, ANSWER_TYPE, PROXY_PROPERTY, TIMEOUT, CANCELLABLE)
 
46
        reply = self.bus.call_sync(DESTINATION, PATH, INTERFACE, GETALL_METHOD, \
 
47
            GETALL_ARGS, GETALL_ANSWER_TYPE, PROXY_PROPERTY, TIMEOUT, CANCELLABLE)
46
48
        return reply.unpack()
47
49
 
48
50
class ZeitgeistInterface: