Accessing contacts via d-bus
Accessing contacts via d-bus
Re: Accessing contacts via d-bus
2009-07-03 12:04 UTC
Hi,
Contact-infos does access contact but not via DBus (via libebook API if
I remember correctly) !
It then offers a DBus interface to allow users to choose the contact
they want via a dialog.
ContactInfos can access built-in contact or GPE contacts ...
Fred
Tatu Lahtela a écrit :
> Hi,
> Are there any examples on how I can access the addressbook via d-bus? By
> looking at the dbus-monitor logs I seet that interfaces such as
> org.gnome.evolution.dataserver.AddressBook are used, but I've had no
> luck getting anything out of them.
>
> If anyone has done it, a short example with e.g. dbus-send or code would
> be really appreciated on how I can e.g. get a list of my contacts.
>
> cheers,
> --
> Tatu Lahtela <lahtela@iki.fi <mailto:lahtela@iki.fi>>
>
>
> ------------------------------------------------------------------------
>
Contact-infos does access contact but not via DBus (via libebook API if
I remember correctly) !
It then offers a DBus interface to allow users to choose the contact
they want via a dialog.
ContactInfos can access built-in contact or GPE contacts ...
Fred
Tatu Lahtela a écrit :
> Hi,
> Are there any examples on how I can access the addressbook via d-bus? By
> looking at the dbus-monitor logs I seet that interfaces such as
> org.gnome.evolution.dataserver.AddressBook are used, but I've had no
> luck getting anything out of them.
>
> If anyone has done it, a short example with e.g. dbus-send or code would
> be really appreciated on how I can e.g. get a list of my contacts.
>
> cheers,
> --
> Tatu Lahtela <lahtela@iki.fi <mailto:lahtela@iki.fi>>
>
>
> ------------------------------------------------------------------------
>
Re: Accessing contacts via d-bus
2009-07-03 12:42 UTC
Hi,
I don't know if a D-Bus API exists or it it is public, but you could use the
C API as Fred told before.
In case you are using Qt, you have to use QLibrary [1] as we have done with
GConf [2].
BR,
Antonio
[1] http://doc.qtsoftware.com/4.5/qlibrary.html
[2]
http://qt.gitorious.org/+qt-maemo-developers/qt/qt-maemo/trees/maemo-internet-connectivity/src/network/maemo
On Fri, Jul 3, 2009 at 3:04 PM, Fred <Fred@lefevere-laoide.net> wrote:
> Hi,
>
> Contact-infos does access contact but not via DBus (via libebook API if
> I remember correctly) !
> It then offers a DBus interface to allow users to choose the contact
> they want via a dialog.
>
> ContactInfos can access built-in contact or GPE contacts ...
>
> Fred
>
>
> Tatu Lahtela a écrit :
> > Hi,
> > Are there any examples on how I can access the addressbook via d-bus? By
> > looking at the dbus-monitor logs I seet that interfaces such as
> > org.gnome.evolution.dataserver.AddressBook are used, but I've had no
> > luck getting anything out of them.
> >
> > If anyone has done it, a short example with e.g. dbus-send or code would
> > be really appreciated on how I can e.g. get a list of my contacts.
> >
> > cheers,
> > --
> > Tatu Lahtela <lahtela@iki.fi <mailto:lahtela@iki.fi>>
> >
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > maemo-developers mailing list
> > maemo-developers@maemo.org
> > https://lists.maemo.org/mailman/listinfo/maemo-developers
>
>
--
Rita Rudner <http://www.brainyquote.com/quotes/authors/r/rita_rudner.html>
- "I was a vegetarian until I started leaning toward the sunlight."
I don't know if a D-Bus API exists or it it is public, but you could use the
C API as Fred told before.
In case you are using Qt, you have to use QLibrary [1] as we have done with
GConf [2].
BR,
Antonio
[1] http://doc.qtsoftware.com/4.5/qlibrary.html
[2]
http://qt.gitorious.org/+qt-maemo-developers/qt/qt-maemo/trees/maemo-internet-connectivity/src/network/maemo
On Fri, Jul 3, 2009 at 3:04 PM, Fred <Fred@lefevere-laoide.net> wrote:
> Hi,
>
> Contact-infos does access contact but not via DBus (via libebook API if
> I remember correctly) !
> It then offers a DBus interface to allow users to choose the contact
> they want via a dialog.
>
> ContactInfos can access built-in contact or GPE contacts ...
>
> Fred
>
>
> Tatu Lahtela a écrit :
> > Hi,
> > Are there any examples on how I can access the addressbook via d-bus? By
> > looking at the dbus-monitor logs I seet that interfaces such as
> > org.gnome.evolution.dataserver.AddressBook are used, but I've had no
> > luck getting anything out of them.
> >
> > If anyone has done it, a short example with e.g. dbus-send or code would
> > be really appreciated on how I can e.g. get a list of my contacts.
> >
> > cheers,
> > --
> > Tatu Lahtela <lahtela@iki.fi <mailto:lahtela@iki.fi>>
> >
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > maemo-developers mailing list
> > maemo-developers@maemo.org
> > https://lists.maemo.org/mailman/listinfo/maemo-developers
>
>
--
Rita Rudner <http://www.brainyquote.com/quotes/authors/r/rita_rudner.html>
- "I was a vegetarian until I started leaning toward the sunlight."
Re: Accessing contacts via d-bus
2009-07-03 13:46 UTC
On Fri, 2009-07-03 at 14:45 +0300, Tatu Lahtela wrote:
> Are there any examples on how I can access the addressbook via d-bus?
> By looking at the dbus-monitor logs I seet that interfaces such as
> org.gnome.evolution.dataserver.AddressBook are used, but I've had no
> luck getting anything out of them.
>
> If anyone has done it, a short example with e.g. dbus-send or code
> would be really appreciated on how I can e.g. get a list of my
> contacts.
Don't. The DBus API to evolution-data-server isn't really stable (it
hasn't changed much recently but there are no assurances that it won't
change overnight) and if you do access it directly you'll need to
provide a vCard parser. Just use libebook.
Ross
--
Ross Burton mail: ross@burtonini.com
jabber: ross@burtonini.com
www: http://burtonini.com
> Are there any examples on how I can access the addressbook via d-bus?
> By looking at the dbus-monitor logs I seet that interfaces such as
> org.gnome.evolution.dataserver.AddressBook are used, but I've had no
> luck getting anything out of them.
>
> If anyone has done it, a short example with e.g. dbus-send or code
> would be really appreciated on how I can e.g. get a list of my
> contacts.
Don't. The DBus API to evolution-data-server isn't really stable (it
hasn't changed much recently but there are no assurances that it won't
change overnight) and if you do access it directly you'll need to
provide a vCard parser. Just use libebook.
Ross
--
Ross Burton mail: ross@burtonini.com
jabber: ross@burtonini.com
www: http://burtonini.com
Re: Accessing contacts via d-bus
2009-07-06 06:00 UTC
Yes I'm doing QT. I initially tried to use the c apis but I had some
troubles compiling/using them. Maybe that gconf example will help, but If
know any app that uses e-book (preferrably a c++ app) that I could look at,
that would be great.
-Tatu
On Fri, Jul 3, 2009 at 3:42 PM, Antonio Aloisio
<antonio.aloisio@gmail.com>wrote:
> Hi,
> I don't know if a D-Bus API exists or it it is public, but you could use
> the C API as Fred told before.
> In case you are using Qt, you have to use QLibrary [1] as we have done with
> GConf [2].
>
> BR,
> Antonio
>
> [1] http://doc.qtsoftware.com/4.5/qlibrary.html
> [2]
> http://qt.gitorious.org/+qt-maemo-developers/qt/qt-maemo/trees/maemo-internet-connectivity/src/network/maemo
>
>
> On Fri, Jul 3, 2009 at 3:04 PM, Fred <Fred@lefevere-laoide.net> wrote:
>
>> Hi,
>>
>> Contact-infos does access contact but not via DBus (via libebook API if
>> I remember correctly) !
>> It then offers a DBus interface to allow users to choose the contact
>> they want via a dialog.
>>
>> ContactInfos can access built-in contact or GPE contacts ...
>>
>> Fred
>>
>>
>> Tatu Lahtela a écrit :
>> > Hi,
>> > Are there any examples on how I can access the addressbook via d-bus? By
>> > looking at the dbus-monitor logs I seet that interfaces such as
>> > org.gnome.evolution.dataserver.AddressBook are used, but I've had no
>> > luck getting anything out of them.
>> >
>> > If anyone has done it, a short example with e.g. dbus-send or code would
>> > be really appreciated on how I can e.g. get a list of my contacts.
>> >
>> > cheers,
>> > --
>> > Tatu Lahtela <lahtela@iki.fi <mailto:lahtela@iki.fi>>
>> >
>> >
>> > ------------------------------------------------------------------------
>> >
>> > _______________________________________________
>> > maemo-developers mailing list
>> > maemo-developers@maemo.org
>> > https://lists.maemo.org/mailman/listinfo/maemo-developers
>>
>>
>
>
>
> --
>
> Rita Rudner <http://www.brainyquote.com/quotes/authors/r/rita_rudner.html> - "I was a vegetarian until I started leaning toward the sunlight."
--
Tatu Lahtela <lahtela@iki.fi>
troubles compiling/using them. Maybe that gconf example will help, but If
know any app that uses e-book (preferrably a c++ app) that I could look at,
that would be great.
-Tatu
On Fri, Jul 3, 2009 at 3:42 PM, Antonio Aloisio
<antonio.aloisio@gmail.com>wrote:
> Hi,
> I don't know if a D-Bus API exists or it it is public, but you could use
> the C API as Fred told before.
> In case you are using Qt, you have to use QLibrary [1] as we have done with
> GConf [2].
>
> BR,
> Antonio
>
> [1] http://doc.qtsoftware.com/4.5/qlibrary.html
> [2]
> http://qt.gitorious.org/+qt-maemo-developers/qt/qt-maemo/trees/maemo-internet-connectivity/src/network/maemo
>
>
> On Fri, Jul 3, 2009 at 3:04 PM, Fred <Fred@lefevere-laoide.net> wrote:
>
>> Hi,
>>
>> Contact-infos does access contact but not via DBus (via libebook API if
>> I remember correctly) !
>> It then offers a DBus interface to allow users to choose the contact
>> they want via a dialog.
>>
>> ContactInfos can access built-in contact or GPE contacts ...
>>
>> Fred
>>
>>
>> Tatu Lahtela a écrit :
>> > Hi,
>> > Are there any examples on how I can access the addressbook via d-bus? By
>> > looking at the dbus-monitor logs I seet that interfaces such as
>> > org.gnome.evolution.dataserver.AddressBook are used, but I've had no
>> > luck getting anything out of them.
>> >
>> > If anyone has done it, a short example with e.g. dbus-send or code would
>> > be really appreciated on how I can e.g. get a list of my contacts.
>> >
>> > cheers,
>> > --
>> > Tatu Lahtela <lahtela@iki.fi <mailto:lahtela@iki.fi>>
>> >
>> >
>> > ------------------------------------------------------------------------
>> >
>> > _______________________________________________
>> > maemo-developers mailing list
>> > maemo-developers@maemo.org
>> > https://lists.maemo.org/mailman/listinfo/maemo-developers
>>
>>
>
>
>
> --
>
> Rita Rudner <http://www.brainyquote.com/quotes/authors/r/rita_rudner.html> - "I was a vegetarian until I started leaning toward the sunlight."
--
Tatu Lahtela <lahtela@iki.fi>
Re: Accessing contacts via d-bus
2009-07-06 06:23 UTC
I initially tried to use the maemo-examples and the example_abook as a base
but the headers don't compile with c++:
In file included from
/usr/include/osso-addressbook-1.0/libosso-abook/osso-abook-tree-model.h:18,
from
/usr/include/osso-addressbook-1.0/libosso-abook/osso-abook-account-model.h:13,
from
/usr/include/osso-addressbook-1.0/libosso-abook/osso-abook.h:16,
from ContactSearch.cpp:15:
/usr/include/osso-addressbook-1.0/libosso-abook/osso-abook-caps.h: In
function `OssoABookCapsFlags
osso_abook_caps_from_account_type(OssoABookAccountTypeFlags)':
/usr/include/osso-addressbook-1.0/libosso-abook/osso-abook-caps.h:76: error:
invalid conversion from `int' to `OssoABookCapsFlags'
/usr/include/osso-addressbook-1.0/libosso-abook/osso-abook-caps.h:77: error:
invalid conversion from `int' to `OssoABookCapsFlags'
/usr/include/osso-addressbook-1.0/libosso-abook/osso-abook-caps.h:79: error:
invalid conversion from `int' to `OssoABookCapsFlags'
In file included from
/usr/include/osso-addressbook-1.0/libosso-abook/osso-abook.h:30,
from ContactSearch.cpp:15:
/usr/include/osso-addressbook-1.0/libosso-abook/osso-abook-contact-editor.h:
At global scope:
/usr/include/osso-addressbook-1.0/libosso-abook/osso-abook-contact-editor.h:81:
error: expected `,' or `...' before "new"
In file included from
/usr/include/osso-addressbook-1.0/libosso-abook/osso-abook.h:32,
from ContactSearch.cpp:15:
/usr/include/osso-addressbook-1.0/libosso-abook/osso-abook-contact.h:31:
error: expected `,' or `...' before "new"
On Mon, Jul 6, 2009 at 9:00 AM, Tatu Lahtela <lahtela@iki.fi> wrote:
> Yes I'm doing QT. I initially tried to use the c apis but I had some
> troubles compiling/using them. Maybe that gconf example will help, but If
> know any app that uses e-book (preferrably a c++ app) that I could look at,
> that would be great.
>
> -Tatu
>
>
>
> On Fri, Jul 3, 2009 at 3:42 PM, Antonio Aloisio <antonio.aloisio@gmail.com
> > wrote:
>
>> Hi,
>> I don't know if a D-Bus API exists or it it is public, but you could use
>> the C API as Fred told before.
>> In case you are using Qt, you have to use QLibrary [1] as we have done
>> with GConf [2].
>>
>> BR,
>> Antonio
>>
>> [1] http://doc.qtsoftware.com/4.5/qlibrary.html
>> [2]
>> http://qt.gitorious.org/+qt-maemo-developers/qt/qt-maemo/trees/maemo-internet-connectivity/src/network/maemo
>>
>>
>> On Fri, Jul 3, 2009 at 3:04 PM, Fred <Fred@lefevere-laoide.net> wrote:
>>
>>> Hi,
>>>
>>> Contact-infos does access contact but not via DBus (via libebook API if
>>> I remember correctly) !
>>> It then offers a DBus interface to allow users to choose the contact
>>> they want via a dialog.
>>>
>>> ContactInfos can access built-in contact or GPE contacts ...
>>>
>>> Fred
>>>
>>>
>>> Tatu Lahtela a écrit :
>>> > Hi,
>>> > Are there any examples on how I can access the addressbook via d-bus?
>>> By
>>> > looking at the dbus-monitor logs I seet that interfaces such as
>>> > org.gnome.evolution.dataserver.AddressBook are used, but I've had no
>>> > luck getting anything out of them.
>>> >
>>> > If anyone has done it, a short example with e.g. dbus-send or code
>>> would
>>> > be really appreciated on how I can e.g. get a list of my contacts.
>>> >
>>> > cheers,
>>> > --
>>> > Tatu Lahtela <lahtela@iki.fi <mailto:lahtela@iki.fi>>
>>> >
>>> >
>>> >
>>> ------------------------------------------------------------------------
>>> >
>>> > _______________________________________________
>>> > maemo-developers mailing list
>>> > maemo-developers@maemo.org
>>> > https://lists.maemo.org/mailman/listinfo/maemo-developers
>>>
>>>
>>
>>
>>
>> --
>>
>> Rita Rudner<http://www.brainyquote.com/quotes/authors/r/rita_rudner.html> - "I was a vegetarian until I started leaning toward the sunlight."
>
>
>
>
> --
> Tatu Lahtela <lahtela@iki.fi>
>
--
Tatu Lahtela <lahtela@iki.fi>
but the headers don't compile with c++:
In file included from
/usr/include/osso-addressbook-1.0/libosso-abook/osso-abook-tree-model.h:18,
from
/usr/include/osso-addressbook-1.0/libosso-abook/osso-abook-account-model.h:13,
from
/usr/include/osso-addressbook-1.0/libosso-abook/osso-abook.h:16,
from ContactSearch.cpp:15:
/usr/include/osso-addressbook-1.0/libosso-abook/osso-abook-caps.h: In
function `OssoABookCapsFlags
osso_abook_caps_from_account_type(OssoABookAccountTypeFlags)':
/usr/include/osso-addressbook-1.0/libosso-abook/osso-abook-caps.h:76: error:
invalid conversion from `int' to `OssoABookCapsFlags'
/usr/include/osso-addressbook-1.0/libosso-abook/osso-abook-caps.h:77: error:
invalid conversion from `int' to `OssoABookCapsFlags'
/usr/include/osso-addressbook-1.0/libosso-abook/osso-abook-caps.h:79: error:
invalid conversion from `int' to `OssoABookCapsFlags'
In file included from
/usr/include/osso-addressbook-1.0/libosso-abook/osso-abook.h:30,
from ContactSearch.cpp:15:
/usr/include/osso-addressbook-1.0/libosso-abook/osso-abook-contact-editor.h:
At global scope:
/usr/include/osso-addressbook-1.0/libosso-abook/osso-abook-contact-editor.h:81:
error: expected `,' or `...' before "new"
In file included from
/usr/include/osso-addressbook-1.0/libosso-abook/osso-abook.h:32,
from ContactSearch.cpp:15:
/usr/include/osso-addressbook-1.0/libosso-abook/osso-abook-contact.h:31:
error: expected `,' or `...' before "new"
On Mon, Jul 6, 2009 at 9:00 AM, Tatu Lahtela <lahtela@iki.fi> wrote:
> Yes I'm doing QT. I initially tried to use the c apis but I had some
> troubles compiling/using them. Maybe that gconf example will help, but If
> know any app that uses e-book (preferrably a c++ app) that I could look at,
> that would be great.
>
> -Tatu
>
>
>
> On Fri, Jul 3, 2009 at 3:42 PM, Antonio Aloisio <antonio.aloisio@gmail.com
> > wrote:
>
>> Hi,
>> I don't know if a D-Bus API exists or it it is public, but you could use
>> the C API as Fred told before.
>> In case you are using Qt, you have to use QLibrary [1] as we have done
>> with GConf [2].
>>
>> BR,
>> Antonio
>>
>> [1] http://doc.qtsoftware.com/4.5/qlibrary.html
>> [2]
>> http://qt.gitorious.org/+qt-maemo-developers/qt/qt-maemo/trees/maemo-internet-connectivity/src/network/maemo
>>
>>
>> On Fri, Jul 3, 2009 at 3:04 PM, Fred <Fred@lefevere-laoide.net> wrote:
>>
>>> Hi,
>>>
>>> Contact-infos does access contact but not via DBus (via libebook API if
>>> I remember correctly) !
>>> It then offers a DBus interface to allow users to choose the contact
>>> they want via a dialog.
>>>
>>> ContactInfos can access built-in contact or GPE contacts ...
>>>
>>> Fred
>>>
>>>
>>> Tatu Lahtela a écrit :
>>> > Hi,
>>> > Are there any examples on how I can access the addressbook via d-bus?
>>> By
>>> > looking at the dbus-monitor logs I seet that interfaces such as
>>> > org.gnome.evolution.dataserver.AddressBook are used, but I've had no
>>> > luck getting anything out of them.
>>> >
>>> > If anyone has done it, a short example with e.g. dbus-send or code
>>> would
>>> > be really appreciated on how I can e.g. get a list of my contacts.
>>> >
>>> > cheers,
>>> > --
>>> > Tatu Lahtela <lahtela@iki.fi <mailto:lahtela@iki.fi>>
>>> >
>>> >
>>> >
>>> ------------------------------------------------------------------------
>>> >
>>> > _______________________________________________
>>> > maemo-developers mailing list
>>> > maemo-developers@maemo.org
>>> > https://lists.maemo.org/mailman/listinfo/maemo-developers
>>>
>>>
>>
>>
>>
>> --
>>
>> Rita Rudner<http://www.brainyquote.com/quotes/authors/r/rita_rudner.html> - "I was a vegetarian until I started leaning toward the sunlight."
>
>
>
>
> --
> Tatu Lahtela <lahtela@iki.fi>
>
--
Tatu Lahtela <lahtela@iki.fi>
Re: Accessing contacts via d-bus
2009-07-06 07:03 UTC
Ok talking to my self now :)
Thanks Antonio, that QT library loading seemed to do the trick. I was able
to access the data with the libebook c api, that osso api wasn't required.
On Mon, Jul 6, 2009 at 9:23 AM, Tatu Lahtela <lahtela@iki.fi> wrote:
> I initially tried to use the maemo-examples and the example_abook as a base
> but the headers don't compile with c++:
>
>
> In file included from
> /usr/include/osso-addressbook-1.0/libosso-abook/osso-abook-tree-model.h:18,
> from
> /usr/include/osso-addressbook-1.0/libosso-abook/osso-abook-account-model.h:13,
> from
> /usr/include/osso-addressbook-1.0/libosso-abook/osso-abook.h:16,
> from ContactSearch.cpp:15:
> /usr/include/osso-addressbook-1.0/libosso-abook/osso-abook-caps.h: In
> function `OssoABookCapsFlags
> osso_abook_caps_from_account_type(OssoABookAccountTypeFlags)':
> /usr/include/osso-addressbook-1.0/libosso-abook/osso-abook-caps.h:76:
> error: invalid conversion from `int' to `OssoABookCapsFlags'
> /usr/include/osso-addressbook-1.0/libosso-abook/osso-abook-caps.h:77:
> error: invalid conversion from `int' to `OssoABookCapsFlags'
> /usr/include/osso-addressbook-1.0/libosso-abook/osso-abook-caps.h:79:
> error: invalid conversion from `int' to `OssoABookCapsFlags'
> In file included from
> /usr/include/osso-addressbook-1.0/libosso-abook/osso-abook.h:30,
> from ContactSearch.cpp:15:
> /usr/include/osso-addressbook-1.0/libosso-abook/osso-abook-contact-editor.h:
> At global scope:
> /usr/include/osso-addressbook-1.0/libosso-abook/osso-abook-contact-editor.h:81:
> error: expected `,' or `...' before "new"
> In file included from
> /usr/include/osso-addressbook-1.0/libosso-abook/osso-abook.h:32,
> from ContactSearch.cpp:15:
> /usr/include/osso-addressbook-1.0/libosso-abook/osso-abook-contact.h:31:
> error: expected `,' or `...' before "new"
>
>
>
>
>
> On Mon, Jul 6, 2009 at 9:00 AM, Tatu Lahtela <lahtela@iki.fi> wrote:
>
>> Yes I'm doing QT. I initially tried to use the c apis but I had some
>> troubles compiling/using them. Maybe that gconf example will help, but If
>> know any app that uses e-book (preferrably a c++ app) that I could look at,
>> that would be great.
>>
>> -Tatu
>>
>>
>>
>> On Fri, Jul 3, 2009 at 3:42 PM, Antonio Aloisio <
>> antonio.aloisio@gmail.com> wrote:
>>
>>> Hi,
>>> I don't know if a D-Bus API exists or it it is public, but you could use
>>> the C API as Fred told before.
>>> In case you are using Qt, you have to use QLibrary [1] as we have done
>>> with GConf [2].
>>>
>>> BR,
>>> Antonio
>>>
>>> [1] http://doc.qtsoftware.com/4.5/qlibrary.html
>>> [2]
>>> http://qt.gitorious.org/+qt-maemo-developers/qt/qt-maemo/trees/maemo-internet-connectivity/src/network/maemo
>>>
>>>
>>> On Fri, Jul 3, 2009 at 3:04 PM, Fred <Fred@lefevere-laoide.net> wrote:
>>>
>>>> Hi,
>>>>
>>>> Contact-infos does access contact but not via DBus (via libebook API if
>>>> I remember correctly) !
>>>> It then offers a DBus interface to allow users to choose the contact
>>>> they want via a dialog.
>>>>
>>>> ContactInfos can access built-in contact or GPE contacts ...
>>>>
>>>> Fred
>>>>
>>>>
>>>> Tatu Lahtela a écrit :
>>>> > Hi,
>>>> > Are there any examples on how I can access the addressbook via d-bus?
>>>> By
>>>> > looking at the dbus-monitor logs I seet that interfaces such as
>>>> > org.gnome.evolution.dataserver.AddressBook are used, but I've had no
>>>> > luck getting anything out of them.
>>>> >
>>>> > If anyone has done it, a short example with e.g. dbus-send or code
>>>> would
>>>> > be really appreciated on how I can e.g. get a list of my contacts.
>>>> >
>>>> > cheers,
>>>> > --
>>>> > Tatu Lahtela <lahtela@iki.fi <mailto:lahtela@iki.fi>>
>>>> >
>>>> >
>>>> >
>>>> ------------------------------------------------------------------------
>>>> >
>>>> > _______________________________________________
>>>> > maemo-developers mailing list
>>>> > maemo-developers@maemo.org
>>>> > https://lists.maemo.org/mailman/listinfo/maemo-developers
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>>
>>> Rita Rudner<http://www.brainyquote.com/quotes/authors/r/rita_rudner.html> - "I was a vegetarian until I started leaning toward the sunlight."
>>
>>
>>
>>
>> --
>> Tatu Lahtela <lahtela@iki.fi>
>>
>
>
>
> --
> Tatu Lahtela <lahtela@iki.fi>
>
--
Tatu Lahtela <lahtela@iki.fi>
Thanks Antonio, that QT library loading seemed to do the trick. I was able
to access the data with the libebook c api, that osso api wasn't required.
On Mon, Jul 6, 2009 at 9:23 AM, Tatu Lahtela <lahtela@iki.fi> wrote:
> I initially tried to use the maemo-examples and the example_abook as a base
> but the headers don't compile with c++:
>
>
> In file included from
> /usr/include/osso-addressbook-1.0/libosso-abook/osso-abook-tree-model.h:18,
> from
> /usr/include/osso-addressbook-1.0/libosso-abook/osso-abook-account-model.h:13,
> from
> /usr/include/osso-addressbook-1.0/libosso-abook/osso-abook.h:16,
> from ContactSearch.cpp:15:
> /usr/include/osso-addressbook-1.0/libosso-abook/osso-abook-caps.h: In
> function `OssoABookCapsFlags
> osso_abook_caps_from_account_type(OssoABookAccountTypeFlags)':
> /usr/include/osso-addressbook-1.0/libosso-abook/osso-abook-caps.h:76:
> error: invalid conversion from `int' to `OssoABookCapsFlags'
> /usr/include/osso-addressbook-1.0/libosso-abook/osso-abook-caps.h:77:
> error: invalid conversion from `int' to `OssoABookCapsFlags'
> /usr/include/osso-addressbook-1.0/libosso-abook/osso-abook-caps.h:79:
> error: invalid conversion from `int' to `OssoABookCapsFlags'
> In file included from
> /usr/include/osso-addressbook-1.0/libosso-abook/osso-abook.h:30,
> from ContactSearch.cpp:15:
> /usr/include/osso-addressbook-1.0/libosso-abook/osso-abook-contact-editor.h:
> At global scope:
> /usr/include/osso-addressbook-1.0/libosso-abook/osso-abook-contact-editor.h:81:
> error: expected `,' or `...' before "new"
> In file included from
> /usr/include/osso-addressbook-1.0/libosso-abook/osso-abook.h:32,
> from ContactSearch.cpp:15:
> /usr/include/osso-addressbook-1.0/libosso-abook/osso-abook-contact.h:31:
> error: expected `,' or `...' before "new"
>
>
>
>
>
> On Mon, Jul 6, 2009 at 9:00 AM, Tatu Lahtela <lahtela@iki.fi> wrote:
>
>> Yes I'm doing QT. I initially tried to use the c apis but I had some
>> troubles compiling/using them. Maybe that gconf example will help, but If
>> know any app that uses e-book (preferrably a c++ app) that I could look at,
>> that would be great.
>>
>> -Tatu
>>
>>
>>
>> On Fri, Jul 3, 2009 at 3:42 PM, Antonio Aloisio <
>> antonio.aloisio@gmail.com> wrote:
>>
>>> Hi,
>>> I don't know if a D-Bus API exists or it it is public, but you could use
>>> the C API as Fred told before.
>>> In case you are using Qt, you have to use QLibrary [1] as we have done
>>> with GConf [2].
>>>
>>> BR,
>>> Antonio
>>>
>>> [1] http://doc.qtsoftware.com/4.5/qlibrary.html
>>> [2]
>>> http://qt.gitorious.org/+qt-maemo-developers/qt/qt-maemo/trees/maemo-internet-connectivity/src/network/maemo
>>>
>>>
>>> On Fri, Jul 3, 2009 at 3:04 PM, Fred <Fred@lefevere-laoide.net> wrote:
>>>
>>>> Hi,
>>>>
>>>> Contact-infos does access contact but not via DBus (via libebook API if
>>>> I remember correctly) !
>>>> It then offers a DBus interface to allow users to choose the contact
>>>> they want via a dialog.
>>>>
>>>> ContactInfos can access built-in contact or GPE contacts ...
>>>>
>>>> Fred
>>>>
>>>>
>>>> Tatu Lahtela a écrit :
>>>> > Hi,
>>>> > Are there any examples on how I can access the addressbook via d-bus?
>>>> By
>>>> > looking at the dbus-monitor logs I seet that interfaces such as
>>>> > org.gnome.evolution.dataserver.AddressBook are used, but I've had no
>>>> > luck getting anything out of them.
>>>> >
>>>> > If anyone has done it, a short example with e.g. dbus-send or code
>>>> would
>>>> > be really appreciated on how I can e.g. get a list of my contacts.
>>>> >
>>>> > cheers,
>>>> > --
>>>> > Tatu Lahtela <lahtela@iki.fi <mailto:lahtela@iki.fi>>
>>>> >
>>>> >
>>>> >
>>>> ------------------------------------------------------------------------
>>>> >
>>>> > _______________________________________________
>>>> > maemo-developers mailing list
>>>> > maemo-developers@maemo.org
>>>> > https://lists.maemo.org/mailman/listinfo/maemo-developers
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>>
>>> Rita Rudner<http://www.brainyquote.com/quotes/authors/r/rita_rudner.html> - "I was a vegetarian until I started leaning toward the sunlight."
>>
>>
>>
>>
>> --
>> Tatu Lahtela <lahtela@iki.fi>
>>
>
>
>
> --
> Tatu Lahtela <lahtela@iki.fi>
>
--
Tatu Lahtela <lahtela@iki.fi>
Re: Accessing contacts via d-bus
2009-07-06 08:14 UTC
Tatu, could you post a link to your code? I'm really interested in seeing an
example of the addressbook connectivity.
Also I came across this:
http://www.kdedevelopers.org/node/3878
which may be useful.
David
Tatu Lahtela wrote:
> Ok talking to my self now :)
>
> Thanks Antonio, that QT library loading seemed to do the trick. I was
> able to access the data with the libebook c api, that osso api wasn't
> required.
--
"Don't worry, you'll be fine; I saw it work in a cartoon once..."
example of the addressbook connectivity.
Also I came across this:
http://www.kdedevelopers.org/node/3878
which may be useful.
David
Tatu Lahtela wrote:
> Ok talking to my self now :)
>
> Thanks Antonio, that QT library loading seemed to do the trick. I was
> able to access the data with the libebook c api, that osso api wasn't
> required.
--
"Don't worry, you'll be fine; I saw it work in a cartoon once..."
Re: Accessing contacts via d-bus
2009-07-07 06:00 UTC
It's mostly directly from the maemo-examples and the abook example. I
attached a short example and a pro file for it that uses pkg_config for it.
It prints out the names in the address book. It needs to be run via
run-standalone.sh.
-Tatu
On Mon, Jul 6, 2009 at 11:14 AM, David Greaves <david@dgreaves.com> wrote:
> Tatu, could you post a link to your code? I'm really interested in seeing
> an
> example of the addressbook connectivity.
>
> Also I came across this:
> http://www.kdedevelopers.org/node/3878
> which may be useful.
>
> David
>
> Tatu Lahtela wrote:
> > Ok talking to my self now :)
> >
> > Thanks Antonio, that QT library loading seemed to do the trick. I was
> > able to access the data with the libebook c api, that osso api wasn't
> > required.
>
>
> --
> "Don't worry, you'll be fine; I saw it work in a cartoon once..."
>
--
Tatu Lahtela <lahtela@iki.fi>
attached a short example and a pro file for it that uses pkg_config for it.
It prints out the names in the address book. It needs to be run via
run-standalone.sh.
-Tatu
On Mon, Jul 6, 2009 at 11:14 AM, David Greaves <david@dgreaves.com> wrote:
> Tatu, could you post a link to your code? I'm really interested in seeing
> an
> example of the addressbook connectivity.
>
> Also I came across this:
> http://www.kdedevelopers.org/node/3878
> which may be useful.
>
> David
>
> Tatu Lahtela wrote:
> > Ok talking to my self now :)
> >
> > Thanks Antonio, that QT library loading seemed to do the trick. I was
> > able to access the data with the libebook c api, that osso api wasn't
> > required.
>
>
> --
> "Don't worry, you'll be fine; I saw it work in a cartoon once..."
>
--
Tatu Lahtela <lahtela@iki.fi>


Are there any examples on how I can access the addressbook via d-bus? By
looking at the dbus-monitor logs I seet that interfaces such as
org.gnome.evolution.dataserver.AddressBook are used, but I've had no luck
getting anything out of them.
If anyone has done it, a short example with e.g. dbus-send or code would be
really appreciated on how I can e.g. get a list of my contacts.
cheers,
--
Tatu Lahtela <lahtela@iki.fi>