summaryrefslogtreecommitdiff
path: root/src/remote.vala
blob: af3e5bcfa4b9679ed8b38513ae29aceecc8302c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
/* remote.vala
 *
 * Copyright © 2011 Collabora Ltd.
 *             By Siegfried-Angel Gevatter Pujals <siegfried@gevatter.com>
 * Copyright © 2011 Michal Hruby <michal.mhr@gmail.com>
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 2.1 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 */

namespace Zeitgeist
{
    public struct VersionStruct
    {
        int major;
        int minor;
        int micro;
    }

    [DBus (name = "org.gnome.zeitgeist.Log")]
    public interface RemoteLog : Object
    {

        [DBus (signature = "(xx)")]
        public abstract Variant delete_events (
            uint32[] event_ids,
            BusName sender
        ) throws Error;

        public abstract uint32[] find_event_ids (
            [DBus (signature = "(xx)")] Variant time_range,
            [DBus (signature = "a(asaasay)")] Variant event_templates,
            uint storage_state, uint num_events, uint result_type,
            BusName sender
        ) throws Error;

        [DBus (signature = "a(asaasay)")]
        public abstract Variant find_events (
            [DBus (signature = "(xx)")] Variant time_range,
            [DBus (signature = "a(asaasay)")] Variant event_templates,
            uint storage_state, uint num_events, uint result_type,
            BusName sender
        ) throws Error;

        public abstract string[] find_related_uris (
            [DBus (signature = "(xx)")] Variant time_range,
            [DBus (signature = "a(asaasay)")] Variant event_templates,
            [DBus (signature = "a(asaasay)")] Variant result_event_templates,
            uint storage_state, uint num_events, uint result_type,
            BusName sender
        ) throws Error;

        [DBus (signature = "a(asaasay)")]
        public abstract Variant get_events (
            uint32[] event_ids,
            BusName sender
        ) throws Error;

        public abstract uint32[] insert_events (
            [DBus (signature = "a(asaasay)")] Variant events,
            BusName sender
        ) throws Error;

        public abstract void install_monitor (
            ObjectPath monitor_path,
            [DBus (signature = "(xx)")] Variant time_range,
            [DBus (signature = "a(asaasay)")] Variant event_templates,
            BusName owner
        ) throws Error;

        public abstract void remove_monitor (
            ObjectPath monitor_path,
            BusName owner
        ) throws Error;

        public abstract void quit () throws Error;

        [DBus (name = "extensions")]
        public abstract string[] extensions { owned get; }

        [DBus (name = "version")]
        public abstract VersionStruct version { owned get; }

    }

    [DBus (name = "org.gnome.zeitgeist.Monitor")]
    public interface RemoteMonitor : Object
    {

        public async abstract void notify_insert (
            [DBus (signature = "(xx)")] Variant time_range,
            [DBus (signature = "a(asaasay)")] Variant events
        ) throws IOError, EngineError;

        public async abstract void notify_delete (
            [DBus (signature = "(xx)")] Variant time_range,
            uint32[] event_ids
        ) throws IOError;

    }

    /* FIXME: Remove this! Only here because of a bug in Vala (see ext-fts) */
    [DBus (name = "org.gnome.zeitgeist.Index")]
    public interface RemoteSimpleIndexer : Object
    {
        public abstract async void search (
            string query_string,
            [DBus (signature = "(xx)")] Variant time_range,
            [DBus (signature = "a(asaasay)")] Variant filter_templates,
            uint offset, uint count, uint result_type,
            [DBus (signature = "a(asaasay)")] out Variant events,
            out uint matches) throws Error;
        public abstract async void search_with_relevancies (
            string query_string,
            [DBus (signature = "(xx)")] Variant time_range,
            [DBus (signature = "a(asaasay)")] Variant filter_templates,
            uint storage_state, uint offset, uint count, uint result_type,
            [DBus (signature = "a(asaasay)")] out Variant events,
            out double[] relevancies, out uint matches) throws Error;
    }
    
    /* FIXME: Remove this! Only here because of a bug in Vala (see ext-fts) */
    [DBus (name = "org.freedesktop.NetworkManager")]
    public interface NetworkManagerDBus : Object
    {
        [DBus (name = "state")]
        public abstract uint32 state () throws IOError;
        public signal void state_changed (uint32 state);
    }
    
    /* FIXME: Remove this! Only here because of a bug in Vala (see ext-fts) */
    [DBus (name = "net.connman.Manager")]
    public interface ConnmanManagerDBus : Object
    {
        public abstract string get_state () throws IOError;
        public signal void state_changed (string state);
    }

}

// vim:expandtab:ts=4:sw=4