23
23
[DBus (name = "net.launchpad.People.Contact")]
24
24
private interface IContact : DBus.Object {
25
25
//public abstract string id { get; }
26
public abstract string get_identifier ();
27
28
public abstract signal void defined_fields_retrieved (string[] fields);
28
29
public abstract signal void fields_retrieved (HashTable<string, string> fields);
41
public string bus_name {
46
public string object_path {
54
_id = contact.get_identifier ();
59
public signal void defined_fields_retrieved (string[] fields);
60
public signal void fields_retrieved (HashTable<string, string> fields);
62
private string _id = null;
40
63
private IContact contact;
66
this.contact = connection.get_object (bus_name, object_path) as IContact;
67
this.contact.defined_fields_retrieved += on_defined_fields_retrieved;
68
this.contact.fields_retrieved += on_fields_retrieved;
42
71
public Contact (DBus.Connection connection, string bus_name, string object_path) {
43
72
this.connection = connection;
44
this.contact = connection.get_object (bus_name, object_path) as IContact;
52
public signal void defined_fields_retrieved (string[] fields);
53
public signal void fields_retrieved (HashTable<string, string> fields);
73
this.bus_name = bus_name;
74
this.object_path = object_path;
55
77
public void request_defined_fields () {
78
this.contact.request_defined_fields ();
58
81
public void request_fields (string[] fields) {
82
this.contact.request_fields (fields);
85
private void on_defined_fields_retrieved (dynamic DBus.Object contact, string[] fields) {
86
this.defined_fields_retrieved (fields);
89
private void on_fields_retrieved (dynamic DBus.Object contact, HashTable<string, string> fields) {
90
this.fields_retrieved (fields);