API changes in libbeagle application
- From: "D Bera" <dbera web gmail com>
- To: dashboard-hackers <dashboard-hackers gnome org>
- Subject: API changes in libbeagle application
- Date: Mon, 3 Dec 2007 07:40:31 -0500
Hey folks,
Beagle-0.3.0 contains libbeagle-1.0 which contains several API
changes; among them these 3 function calls were removed. These were
deprecated methods remaining from old times.
beagle_query_add_hit_type (query, "AAA");
beagle_query_add_mime_type (query, "BBB");
beagle_query_add_source (query, "CCC");
In case you were using these in your application, you can now append
to the query text (before you do beagle_query_add_text):
for hit_type: " type:AAA"
for mimetype: " mimetype:BBB"
for source: " source:CCC"
If specifying multiple hit_types, mime_types or sources, instead
append the various values "OR"-ed together e.g. " mimetype:AAA1 OR
mimetype:AAA2 OR mimetype:AAA3" etc.
If you want greater control, you can always explicitly create the
queries instead of using the query syntax, like
BeagleQueryPartOr or_part = beagle_query_part_or_new ();
// for each value, AAA1, AAA2 etc.
BeagleQueryPartProperty *prop_part = beagle_query_part_property_new ();
beagle_query_part_property_set_property_type (prop_part,
BEAGLE_PROPERTY_TYPE_KEYWORD);
beagle_query_part_property_set_key (prop_part, "beagle:MimeType");
beagle_query_part_property_set_value (prop_part, "AAA1");
beagle_query_part_or_add_subpart (or_part, BEAGLE_QUERY_PART (prop_part));
// Add the or_part to the query
beagle_query_add_part (query, BEAGLE_QUERY_PART (or_part));
nautilus filechooser, yelp, kbeaglebar probably need such changes.
- dBera
--
-----------------------------------------------------
Debajyoti Bera @ http://dtecht.blogspot.com
beagle / KDE fan
Mandriva / Inspiron-1100 user
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]