[tracker/miner-web: 15/26] libtracker-miner: Effectively add the MinerWeb interface and a helper export function
- From: Adrien Bustany <abustany src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [tracker/miner-web: 15/26] libtracker-miner: Effectively add the MinerWeb interface and a helper export function
- Date: Wed, 11 Nov 2009 20:36:32 +0000 (UTC)
commit a29fc3528a16bd3be58dfee09f556b7776a6519a
Author: Adrien Bustany <madcat mymadcat com>
Date: Fri Nov 6 09:41:46 2009 -0300
libtracker-miner: Effectively add the MinerWeb interface and a helper export function
The MinerWeb interface is used to associate a web miner to its web service.
This interface is disponible on a separate path :
/org/freedesktop/Tracker1/Miner/Web/MinerName
src/libtracker-miner/tracker-miner-web.vala | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-miner-web.vala b/src/libtracker-miner/tracker-miner-web.vala
index 13f3f97..be45a13 100644
--- a/src/libtracker-miner/tracker-miner-web.vala
+++ b/src/libtracker-miner/tracker-miner-web.vala
@@ -15,6 +15,7 @@ namespace Tracker {
}
[CCode (cheader_filename = "libtracker-miner/tracker-miner-web.h")]
+ [DBus (name = "org.freedesktop.Tracker1.MinerWeb")]
public interface MinerWeb : Tracker.Miner {
public abstract void Authenticate () throws DBus.Error, MinerWebError;
public abstract HashTable<string, string> AssociationData () throws DBus.Error, MinerWebError;
@@ -27,6 +28,19 @@ namespace Tracker {
public signal void AssociationStatusChanged (AssociationStatus s);
public abstract AssociationStatus GetAssociationStatus () throws DBus.Error;
+
}
+ [CCode (cheader_filename = "libtracker-miner/tracker-miner-web.h")]
+ public static void miner_web_export (MinerWeb miner) throws DBus.Error
+ {
+ try {
+ var conn = DBus.Bus.get (DBus.BusType. SESSION);
+ string miner_name;
+ miner.get ("name", out miner_name);
+ conn.register_object ("/org/freedesktop/Tracker1/Miner/Web/" + miner_name, miner);
+ } catch (Error e) {
+ critical ("Couldn't export MinerWeb DBus interface : %s", e.message);
+ }
+ }
} // namespace Tracker
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]