如何从gjs访问gnome-contacts或其数据 [英] How can I access gnome-contacts or its data from gjs

查看:71
本文介绍了如何从gjs访问gnome-contacts或其数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据此答案(和评论) gnome-contacts是Gnome集中联系人的地方,它很好地完成了通过心灵感应聚合,但是访问该信息的唯一方法似乎是Gnome Shell搜索提供程序,该提供程序仅提供了头像和名称.我一直在努力复制gjs中的gnome-contacts部分,但是绑定时遇到了很多麻烦.

According to this answer (and comments) gnome-contacts is where contacts are centralized for Gnome and it does a good job of aggregating via telepathy, but the only way to access that information seems to be the Gnome Shell search provider which only provides an avatar and a name. I've been struggling to duplicate portions of gnome-contacts in gjs but having tons of trouble with the bindings.

是否有更简单的方法来实现此目的,或者我是否可以为gnome-contacts本身生成vapi/gir绑定,以便像库一样使用它?

Is there an easier way to achieve this, or is it possible for me to generate vapi/gir binding for gnome-contacts itself so I can use it like a library?

可能的替代解决方案:

对于只需要Google联系人的用户,可以通过 GData 在GJS中使用,甚至可以使用 Gnome在线帐户作为身份验证源.

Using libfolks in GJS is currently blocked by Bug #694115, but for those only needing Google Contacts it is possible in GJS via GData and you can even use Gnome Online Accounts as an authentication source, if available.

推荐答案

使用 libfolks ,这是gnome-contacts内部使用的数据来源.libfolks应该可以通过gjs使用,尽管尚未经过广泛测试,所以可能存在绑定问题.

Use libfolks, which is what gnome-contacts uses internally to source its data. libfolks should be usable via gjs, although this has not been extensively tested, so there might be binding issues.

请在此处报告任何绑定问题.

Please report any binding issues here.

这篇关于如何从gjs访问gnome-contacts或其数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆