Merge lp:~mhr3/libzeitgeist/various-fixes into lp:libzeitgeist
- various-fixes
- Merge into trunk
Status: | Merged |
---|---|
Merge reported by: | Mikkel Kamstrup Erlandsen |
Merged at revision: | not available |
Proposed branch: | lp:~mhr3/libzeitgeist/various-fixes |
Merge into: | lp:libzeitgeist |
Diff against target: |
398 lines (+128/-67) 9 files modified
bindings/zeitgeist-1.0-custom.vala (+3/-0) bindings/zeitgeist-1.0.gi (+82/-34) bindings/zeitgeist-1.0.metadata (+4/-2) bindings/zeitgeist-1.0.vapi (+23/-13) configure.ac (+1/-1) src/zeitgeist-log.c (+8/-8) src/zeitgeist-log.h (+2/-2) src/zeitgeist-monitor.c (+2/-6) src/zeitgeist-monitor.h (+3/-1) |
To merge this branch: | bzr merge lp:~mhr3/libzeitgeist/various-fixes |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Mikkel Kamstrup Erlandsen | review and distcheck | Approve | |
Review via email: mp+24338@code.launchpad.net |
Commit message
Description of the change
More binding related fixes.
Mikkel Kamstrup Erlandsen (kamstrup) wrote : | # |
Michal Hruby (mhr3) wrote : | # |
Yes, primary goal is addition of ZeitgeistMonitor, other than that there are fixes so now all ZeitgeistLog methods should be usable (and leak-free) in Vala.
As for EggZeitgeistMon
The only issue is that the vapi was generated using git vapigen and the insert_
Mikkel Kamstrup Erlandsen (kamstrup) wrote : | # |
One more thing before I merge. How about changing the signature of Log.insert_
zeitgeist_
to:
zeitgeist_
Ie. making 'events' the second arg. That way the signature is consistent with how GIO does it. See fx. g_output_
Sorry for the fuzz! :-)
- 107. By Mikkel Kamstrup Erlandsen <kamstrup@hardback>
-
Add zeitgeist-1.0.types to doc generation. This makes gtk-doc include properties and signals for the classes
- 108. By Mikkel Kamstrup Erlandsen <kamstrup@hardback>
-
Fix ref to egg_zeitgeist_
storage_ state_get_ type in docs. Should be zeitgeist_ storage_ state_get_ type
Michal Hruby (mhr3) wrote : | # |
Yep, I missed that, fixed and pushed.
Mikkel Kamstrup Erlandsen (kamstrup) wrote : | # |
Merged. Thanks a bunch for your hard work!
- 109. By Mikkel Kamstrup Erlandsen <kamstrup@hardback>
-
Merge Michal Hruby's branch lp:~mhr3/libzeitgeist/various-fixes into trunk. This fixes ZeitgeistMonitor's Vala API and makes the method signature of zeitgeist_
log_insert_ events_ from_ptrarray( ) be in line with those of GIO async methods. Also lower EggDBus requirements to 0.5 (from 0.6)
- 110. By Mikkel Kamstrup Erlandsen <kamstrup@hardback>
-
Improve docs for ZeitgeistMonitor and make the event-templates and time-range properties read-only.
Preview Diff
1 | === modified file 'bindings/zeitgeist-1.0-custom.vala' |
2 | --- bindings/zeitgeist-1.0-custom.vala 2010-04-23 06:18:45 +0000 |
3 | +++ bindings/zeitgeist-1.0-custom.vala 2010-04-29 09:28:31 +0000 |
4 | @@ -19,6 +19,9 @@ |
5 | |
6 | namespace Zeitgeist |
7 | { |
8 | + public interface EggZeitgeistMonitor: GLib.Object |
9 | + { |
10 | + } |
11 | [CCode (cname = "ZEITGEIST_GTIMEVAL_TO_TIMESTAMP")] |
12 | public static int64 timeval_to_timestamp (GLib.TimeVal time_val); |
13 | [CCode (cname = "ZEITGEIST_TIMESTAMP_TO_GTIMEVAL")] |
14 | |
15 | === modified file 'bindings/zeitgeist-1.0.gi' |
16 | --- bindings/zeitgeist-1.0.gi 2010-04-23 09:59:59 +0000 |
17 | +++ bindings/zeitgeist-1.0.gi 2010-04-29 09:28:31 +0000 |
18 | @@ -1,39 +1,39 @@ |
19 | <?xml version="1.0"?> |
20 | <api version="1.0"> |
21 | <namespace name="Zeitgeist"> |
22 | - <struct name="ZeitgeistMonitor"> |
23 | - <method name="get_path" symbol="zeitgeist_monitor_get_path"> |
24 | - <return-type type="gchar*"/> |
25 | - <parameters> |
26 | - <parameter name="self" type="ZeitgeistMonitor*"/> |
27 | - </parameters> |
28 | - </method> |
29 | - <method name="get_templates" symbol="zeitgeist_monitor_get_templates"> |
30 | - <return-type type="GPtrArray*"/> |
31 | - <parameters> |
32 | - <parameter name="self" type="ZeitgeistMonitor*"/> |
33 | - </parameters> |
34 | - </method> |
35 | - <method name="get_time_range" symbol="zeitgeist_monitor_get_time_range"> |
36 | - <return-type type="ZeitgeistTimeRange*"/> |
37 | - <parameters> |
38 | - <parameter name="self" type="ZeitgeistMonitor*"/> |
39 | - </parameters> |
40 | - </method> |
41 | - <method name="new" symbol="zeitgeist_monitor_new"> |
42 | - <return-type type="ZeitgeistMonitor*"/> |
43 | - <parameters> |
44 | - <parameter name="time_range" type="ZeitgeistTimeRange*"/> |
45 | - <parameter name="event_templates" type="GPtrArray*"/> |
46 | - </parameters> |
47 | - </method> |
48 | - <field name="parent_instance" type="GObject"/> |
49 | - </struct> |
50 | - <struct name="ZeitgeistMonitorClass"> |
51 | - <field name="parent_class" type="GObjectClass"/> |
52 | - <field name="events_inserted" type="GCallback"/> |
53 | - <field name="events_deleted" type="GCallback"/> |
54 | - </struct> |
55 | + <function name="interpretation_for_mimetype" symbol="zeitgeist_interpretation_for_mimetype"> |
56 | + <return-type type="gchar*"/> |
57 | + <parameters> |
58 | + <parameter name="mimetype" type="gchar*"/> |
59 | + </parameters> |
60 | + </function> |
61 | + <function name="manifestation_for_uri" symbol="zeitgeist_manifestation_for_uri"> |
62 | + <return-type type="gchar*"/> |
63 | + <parameters> |
64 | + <parameter name="uri" type="gchar*"/> |
65 | + </parameters> |
66 | + </function> |
67 | + <function name="register_mimetype" symbol="zeitgeist_register_mimetype"> |
68 | + <return-type type="void"/> |
69 | + <parameters> |
70 | + <parameter name="mimetype" type="gchar*"/> |
71 | + <parameter name="interpretation_uri" type="gchar*"/> |
72 | + </parameters> |
73 | + </function> |
74 | + <function name="register_mimetype_regex" symbol="zeitgeist_register_mimetype_regex"> |
75 | + <return-type type="void"/> |
76 | + <parameters> |
77 | + <parameter name="mimetype_regex" type="gchar*"/> |
78 | + <parameter name="interpretation_uri" type="gchar*"/> |
79 | + </parameters> |
80 | + </function> |
81 | + <function name="register_uri_scheme" symbol="zeitgeist_register_uri_scheme"> |
82 | + <return-type type="void"/> |
83 | + <parameters> |
84 | + <parameter name="uri_scheme" type="gchar*"/> |
85 | + <parameter name="manifestation_type" type="gchar*"/> |
86 | + </parameters> |
87 | + </function> |
88 | <enum name="ZeitgeistResultType" type-name="ZeitgeistResultType" get-type="zeitgeist_result_type_get_type"> |
89 | <member name="ZEITGEIST_RESULT_TYPE_MOST_RECENT_EVENTS" value="0"/> |
90 | <member name="ZEITGEIST_RESULT_TYPE_LEAST_RECENT_EVENTS" value="1"/> |
91 | @@ -320,10 +320,10 @@ |
92 | <return-type type="void"/> |
93 | <parameters> |
94 | <parameter name="self" type="ZeitgeistLog*"/> |
95 | + <parameter name="events" type="GPtrArray*"/> |
96 | <parameter name="cancellable" type="GCancellable*"/> |
97 | <parameter name="callback" type="GAsyncReadyCallback"/> |
98 | <parameter name="user_data" type="gpointer"/> |
99 | - <parameter name="events" type="GPtrArray*"/> |
100 | </parameters> |
101 | </method> |
102 | <method name="insert_events_no_reply" symbol="zeitgeist_log_insert_events_no_reply"> |
103 | @@ -399,6 +399,54 @@ |
104 | </parameters> |
105 | </method> |
106 | </object> |
107 | + <object name="ZeitgeistMonitor" parent="GObject" type-name="ZeitgeistMonitor" get-type="zeitgeist_monitor_get_type"> |
108 | + <implements> |
109 | + <interface name="EggZeitgeistMonitor"/> |
110 | + </implements> |
111 | + <method name="get_path" symbol="zeitgeist_monitor_get_path"> |
112 | + <return-type type="gchar*"/> |
113 | + <parameters> |
114 | + <parameter name="self" type="ZeitgeistMonitor*"/> |
115 | + </parameters> |
116 | + </method> |
117 | + <method name="get_templates" symbol="zeitgeist_monitor_get_templates"> |
118 | + <return-type type="GPtrArray*"/> |
119 | + <parameters> |
120 | + <parameter name="self" type="ZeitgeistMonitor*"/> |
121 | + </parameters> |
122 | + </method> |
123 | + <method name="get_time_range" symbol="zeitgeist_monitor_get_time_range"> |
124 | + <return-type type="ZeitgeistTimeRange*"/> |
125 | + <parameters> |
126 | + <parameter name="self" type="ZeitgeistMonitor*"/> |
127 | + </parameters> |
128 | + </method> |
129 | + <constructor name="new" symbol="zeitgeist_monitor_new"> |
130 | + <return-type type="ZeitgeistMonitor*"/> |
131 | + <parameters> |
132 | + <parameter name="time_range" type="ZeitgeistTimeRange*"/> |
133 | + <parameter name="event_templates" type="GPtrArray*"/> |
134 | + </parameters> |
135 | + </constructor> |
136 | + <property name="event-templates" type="GPtrArray*" readable="1" writable="1" construct="0" construct-only="1"/> |
137 | + <property name="time-range" type="ZeitgeistTimeRange*" readable="1" writable="1" construct="0" construct-only="1"/> |
138 | + <signal name="events-deleted" when="LAST"> |
139 | + <return-type type="void"/> |
140 | + <parameters> |
141 | + <parameter name="self" type="ZeitgeistMonitor*"/> |
142 | + <parameter name="time_range" type="ZeitgeistTimeRange*"/> |
143 | + <parameter name="event_ids" type="GArray*"/> |
144 | + </parameters> |
145 | + </signal> |
146 | + <signal name="events-inserted" when="LAST"> |
147 | + <return-type type="void"/> |
148 | + <parameters> |
149 | + <parameter name="self" type="ZeitgeistMonitor*"/> |
150 | + <parameter name="time_range" type="ZeitgeistTimeRange*"/> |
151 | + <parameter name="events" type="GPtrArray*"/> |
152 | + </parameters> |
153 | + </signal> |
154 | + </object> |
155 | <object name="ZeitgeistSubject" parent="GInitiallyUnowned" type-name="ZeitgeistSubject" get-type="zeitgeist_subject_get_type"> |
156 | <method name="get_interpretation" symbol="zeitgeist_subject_get_interpretation"> |
157 | <return-type type="gchar*"/> |
158 | |
159 | === modified file 'bindings/zeitgeist-1.0.metadata' |
160 | --- bindings/zeitgeist-1.0.metadata 2010-04-23 06:40:26 +0000 |
161 | +++ bindings/zeitgeist-1.0.metadata 2010-04-29 09:28:31 +0000 |
162 | @@ -1,8 +1,9 @@ |
163 | Zeitgeist cheader_filename="zeitgeist.h" |
164 | zeitgeist_log_new transfer_ownership="1" |
165 | zeitgeist_log_insert_events ellipsis="1" async="1" |
166 | -zeitgeist_log_insert_events_from_ptrarray async="1" |
167 | +zeitgeist_log_insert_events_from_ptrarray async="1" finish_name="zeitgeist_log_insert_events_finish" |
168 | zeitgeist_log_insert_events_from_ptrarray.events transfer_ownership="1" |
169 | +zeitgeist_log_insert_events_valist hidden="1" |
170 | zeitgeist_log_insert_events_no_reply ellipsis="1" |
171 | zeitgeist_log_insert_events_finish transfer_ownership="1" |
172 | zeitgeist_log_find_events async="1" |
173 | @@ -17,7 +18,7 @@ |
174 | zeitgeist_log_find_related_uris async="1" |
175 | zeitgeist_log_find_related_uris.event_templates transfer_ownership="1" |
176 | zeitgeist_log_find_related_uris.result_event_templates transfer_ownership="1" |
177 | -zeitgeist_log_find_related_uris_finish is_array="1" no_array_lengh="1" array_null_terminated="1" transfer_ownership="1" |
178 | +zeitgeist_log_find_related_uris_finish is_array="1" no_array_length="1" array_null_terminated="1" transfer_ownership="1" |
179 | zeitgeist_log_delete_events async="1" |
180 | zeitgeist_log_delete_events.event_ids transfer_ownership="1" |
181 | zeitgeist_log_delete_log async="1" |
182 | @@ -25,5 +26,6 @@ |
183 | zeitgeist_log_install_monitor async="1" |
184 | zeitgeist_log_remove_monitor async="1" |
185 | zeitgeist_event_new_full ellipsis="1" |
186 | +zeitgeist_monitor_new.event_templates transfer_ownership="1" |
187 | |
188 | zeitgeist_log_*.cancellable nullable="1" |
189 | |
190 | === modified file 'bindings/zeitgeist-1.0.vapi' |
191 | --- bindings/zeitgeist-1.0.vapi 2010-04-23 09:59:59 +0000 |
192 | +++ bindings/zeitgeist-1.0.vapi 2010-04-29 09:28:31 +0000 |
193 | @@ -39,6 +39,7 @@ |
194 | public GLib.Array find_event_ids_finish (GLib.AsyncResult res) throws GLib.Error; |
195 | public async GLib.PtrArray find_events (Zeitgeist.TimeRange time_range, owned GLib.PtrArray event_templates, Zeitgeist.StorageState storage_state, uint32 num_events, Zeitgeist.ResultType result_type, GLib.Cancellable? cancellable) throws GLib.Error; |
196 | public GLib.PtrArray find_events_finish (GLib.AsyncResult res) throws GLib.Error; |
197 | + [CCode (array_length = false, array_null_terminated = true)] |
198 | public async string[] find_related_uris (Zeitgeist.TimeRange time_range, owned GLib.PtrArray event_templates, owned GLib.PtrArray result_event_templates, Zeitgeist.StorageState storage_state, uint32 num_events, Zeitgeist.ResultType result_type, GLib.Cancellable? cancellable) throws GLib.Error; |
199 | [CCode (array_length = false, array_null_terminated = true)] |
200 | public string[] find_related_uris_finish (GLib.AsyncResult res) throws GLib.Error; |
201 | @@ -46,9 +47,9 @@ |
202 | public GLib.PtrArray get_events_finish (GLib.AsyncResult res) throws GLib.Error; |
203 | public async GLib.Array insert_events (GLib.Cancellable? cancellable, ...) throws GLib.Error; |
204 | public GLib.Array insert_events_finish (GLib.AsyncResult res) throws GLib.Error; |
205 | - public async void insert_events_from_ptrarray (GLib.Cancellable? cancellable, owned GLib.PtrArray events); |
206 | + [CCode (finish_name = "zeitgeist_log_insert_events_finish")] |
207 | + public async GLib.Array insert_events_from_ptrarray (owned GLib.PtrArray events, GLib.Cancellable? cancellable) throws GLib.Error; |
208 | public void insert_events_no_reply (...); |
209 | - public void insert_events_valist (GLib.Cancellable? cancellable, GLib.AsyncReadyCallback callback, void* events); |
210 | public async bool install_monitor (Zeitgeist.Monitor monitor, GLib.Cancellable? cancellable) throws GLib.Error; |
211 | public bool install_monitor_finish (GLib.AsyncResult res) throws GLib.Error; |
212 | public async bool quit (GLib.Cancellable? cancellable) throws GLib.Error; |
213 | @@ -56,22 +57,18 @@ |
214 | public async bool remove_monitor (Zeitgeist.Monitor monitor, GLib.Cancellable? cancellable) throws GLib.Error; |
215 | public bool remove_monitor_finish (GLib.AsyncResult res) throws GLib.Error; |
216 | } |
217 | - [Compact] |
218 | [CCode (cheader_filename = "zeitgeist.h")] |
219 | - public class Monitor { |
220 | - public weak GLib.Object parent_instance; |
221 | + public class Monitor : GLib.Object, Zeitgeist.EggZeitgeistMonitor { |
222 | [CCode (has_construct_function = false)] |
223 | - public Monitor (Zeitgeist.TimeRange time_range, GLib.PtrArray event_templates); |
224 | + public Monitor (Zeitgeist.TimeRange time_range, owned GLib.PtrArray event_templates); |
225 | public unowned string get_path (); |
226 | public unowned GLib.PtrArray get_templates (); |
227 | public unowned Zeitgeist.TimeRange get_time_range (); |
228 | - } |
229 | - [Compact] |
230 | - [CCode (cheader_filename = "zeitgeist.h")] |
231 | - public class MonitorClass { |
232 | - public weak GLib.Callback events_deleted; |
233 | - public weak GLib.Callback events_inserted; |
234 | - public weak GLib.ObjectClass parent_class; |
235 | + [NoAccessorMethod] |
236 | + public GLib.PtrArray event_templates { owned get; construct; } |
237 | + public Zeitgeist.TimeRange time_range { get; construct; } |
238 | + public virtual signal void events_deleted (Zeitgeist.TimeRange time_range, GLib.Array event_ids); |
239 | + public virtual signal void events_inserted (Zeitgeist.TimeRange time_range, GLib.PtrArray events); |
240 | } |
241 | [CCode (cheader_filename = "zeitgeist.h")] |
242 | public class Subject : GLib.InitiallyUnowned { |
243 | @@ -109,6 +106,9 @@ |
244 | [CCode (has_construct_function = false)] |
245 | public TimeRange.to_now (); |
246 | } |
247 | + [CCode (cheader_filename = "zeitgeist.h")] |
248 | + public interface EggZeitgeistMonitor : GLib.Object { |
249 | + } |
250 | [CCode (cprefix = "ZEITGEIST_RESULT_TYPE_", cheader_filename = "zeitgeist.h")] |
251 | public enum ResultType { |
252 | MOST_RECENT_EVENTS, |
253 | @@ -284,6 +284,16 @@ |
254 | public const string ZG_USER_ACTIVITY; |
255 | [CCode (cheader_filename = "zeitgeist.h")] |
256 | public const string ZG_WORLD_ACTIVITY; |
257 | + [CCode (cheader_filename = "zeitgeist.h")] |
258 | + public static unowned string interpretation_for_mimetype (string mimetype); |
259 | + [CCode (cheader_filename = "zeitgeist.h")] |
260 | + public static unowned string manifestation_for_uri (string uri); |
261 | + [CCode (cheader_filename = "zeitgeist.h")] |
262 | + public static void register_mimetype (string mimetype, string interpretation_uri); |
263 | + [CCode (cheader_filename = "zeitgeist.h")] |
264 | + public static void register_mimetype_regex (string mimetype_regex, string interpretation_uri); |
265 | + [CCode (cheader_filename = "zeitgeist.h")] |
266 | + public static void register_uri_scheme (string uri_scheme, string manifestation_type); |
267 | [CCode (cname = "ZEITGEIST_TIMESTAMP_TO_GTIMEVAL", cheader_filename = "zeitgeist.h")] |
268 | public static GLib.TimeVal timestamp_to_timeval (int64 timestamp); |
269 | [CCode (cname = "ZEITGEIST_GTIMEVAL_TO_TIMESTAMP", cheader_filename = "zeitgeist.h")] |
270 | |
271 | === modified file 'configure.ac' |
272 | --- configure.ac 2010-04-20 07:09:49 +0000 |
273 | +++ configure.ac 2010-04-29 09:28:31 +0000 |
274 | @@ -36,7 +36,7 @@ |
275 | # Check library deps |
276 | #################################################################### |
277 | GLIB_REQUIRED=2.20 |
278 | -EGGDBUS_REQUIRED=0.6 |
279 | +EGGDBUS_REQUIRED=0.5 |
280 | |
281 | PKG_CHECK_MODULES(GLIB2, [glib-2.0 >= $GLIB_REQUIRED ]) |
282 | PKG_CHECK_MODULES(GOBJECT2, [gobject-2.0 >= $GLIB_REQUIRED ]) |
283 | |
284 | === modified file 'src/zeitgeist-log.c' |
285 | --- src/zeitgeist-log.c 2010-04-23 06:35:17 +0000 |
286 | +++ src/zeitgeist-log.c 2010-04-29 09:28:31 +0000 |
287 | @@ -428,33 +428,33 @@ |
288 | GPtrArray *_events; |
289 | |
290 | _events = _zeitgeist_events_from_valist (events); |
291 | - zeitgeist_log_insert_events_from_ptrarray (self, cancellable, |
292 | - callback, user_data, _events); |
293 | + zeitgeist_log_insert_events_from_ptrarray (self, _events, cancellable, |
294 | + callback, user_data); |
295 | } |
296 | |
297 | /** |
298 | * zeitgeist_log_insert_events_from_ptrarray: |
299 | * @self: The log logging the events |
300 | + * @events: A #GPtrArray of #ZeitgeistEvent<!-- -->s to insert. This method |
301 | + * steals the reference to @events and consumes all floating refs |
302 | + * on the event members. It is assumed that the free_func on @events |
303 | + * is set to g_object_unref(). |
304 | * @cancellable: To cancel the operation or %NULL |
305 | * @callback: #GAsyncReadyCallback to invoke once the logging operation has |
306 | * completed. Set to %NULL to ignore the result. In this callback |
307 | * you can invoke zeitgeist_log_insert_events_finish() to collect |
308 | * the event ids of the inserted events |
309 | * @user_data: Any user data to pass back to @callback |
310 | - * @events: A #GPtrArray of #ZeitgeistEvent<!-- -->s to insert. This method |
311 | - * steals the reference to @events and consumes all floating refs |
312 | - * on the event members. It is assumed that the free_func on @events |
313 | - * is set to g_object_unref(). |
314 | * |
315 | * Asynchrnously send a set of events to the Zeitgeist daemon, requesting they |
316 | * be inserted into the log. |
317 | */ |
318 | void |
319 | zeitgeist_log_insert_events_from_ptrarray (ZeitgeistLog *self, |
320 | + GPtrArray *events, |
321 | GCancellable *cancellable, |
322 | GAsyncReadyCallback callback, |
323 | - gpointer user_data, |
324 | - GPtrArray *events) |
325 | + gpointer user_data) |
326 | { |
327 | ZeitgeistLogPrivate *priv; |
328 | EggDBusArraySeq *_events; |
329 | |
330 | === modified file 'src/zeitgeist-log.h' |
331 | --- src/zeitgeist-log.h 2010-04-23 06:35:17 +0000 |
332 | +++ src/zeitgeist-log.h 2010-04-29 09:28:31 +0000 |
333 | @@ -76,10 +76,10 @@ |
334 | |
335 | void zeitgeist_log_insert_events_from_ptrarray |
336 | (ZeitgeistLog *self, |
337 | + GPtrArray *events, |
338 | GCancellable *cancellable, |
339 | GAsyncReadyCallback callback, |
340 | - gpointer user_data, |
341 | - GPtrArray *events); |
342 | + gpointer user_data); |
343 | |
344 | GArray* zeitgeist_log_insert_events_finish (ZeitgeistLog *self, |
345 | GAsyncResult *res, |
346 | |
347 | === modified file 'src/zeitgeist-monitor.c' |
348 | --- src/zeitgeist-monitor.c 2010-04-20 07:42:33 +0000 |
349 | +++ src/zeitgeist-monitor.c 2010-04-29 09:28:31 +0000 |
350 | @@ -39,10 +39,6 @@ |
351 | * A monitor must be installed into the running Zeitgeist daemon by calling |
352 | * zeitgeist_log_install_monitor(). The monitor will not emit any of the |
353 | * ::events-added or ::events-deleted signals before this. |
354 | - * |
355 | - * Monitors are sub classes of #GInitiallyUnowned which means that |
356 | - * you may pass them directly to methods provided by the Zeitgeist library |
357 | - * and forget about them. The callee will own the floating reference. |
358 | */ |
359 | |
360 | static void egg_zeitgeist_monitor_iface_init (EggZeitgeistMonitorIface *iface); |
361 | @@ -226,7 +222,7 @@ |
362 | NULL, NULL, |
363 | _zeitgeist_cclosure_marshal_VOID__OBJECT_BOXED, |
364 | G_TYPE_NONE, |
365 | - 2, G_TYPE_OBJECT, G_TYPE_PTR_ARRAY); |
366 | + 2, ZEITGEIST_TYPE_TIME_RANGE, G_TYPE_PTR_ARRAY); |
367 | |
368 | /** |
369 | * ZeitgeistMonitor::events-deleted: |
370 | @@ -242,7 +238,7 @@ |
371 | NULL, NULL, |
372 | _zeitgeist_cclosure_marshal_VOID__OBJECT_BOXED, |
373 | G_TYPE_NONE, |
374 | - 2, G_TYPE_OBJECT, G_TYPE_ARRAY); |
375 | + 2, ZEITGEIST_TYPE_TIME_RANGE, G_TYPE_ARRAY); |
376 | |
377 | g_type_class_add_private (object_class, sizeof (ZeitgeistMonitorPrivate)); |
378 | } |
379 | |
380 | === modified file 'src/zeitgeist-monitor.h' |
381 | --- src/zeitgeist-monitor.h 2010-04-20 07:26:51 +0000 |
382 | +++ src/zeitgeist-monitor.h 2010-04-29 09:28:31 +0000 |
383 | @@ -60,6 +60,8 @@ |
384 | GObject parent_instance; |
385 | }; |
386 | |
387 | +GType zeitgeist_monitor_get_type (); |
388 | + |
389 | ZeitgeistMonitor* zeitgeist_monitor_new (ZeitgeistTimeRange *time_range, |
390 | GPtrArray *event_templates); |
391 | |
392 | @@ -71,4 +73,4 @@ |
393 | |
394 | G_END_DECLS |
395 | |
396 | -#endif /* _ZEITGEIST_MONITOR_H_ */ |
397 | \ No newline at end of file |
398 | +#endif /* _ZEITGEIST_MONITOR_H_ */ |
Looks good I think. Could you elaborate a bit on what the intention of these fixes are?
Also; the primary goal seems to be adding the ZeitgeistMonitor API, but why do you need the EggZeitgeistMon itor? It's not an exported symbol of the lib (just an impl detail)...