<div dir="auto"><div dir="auto">Some quick answers (writing from my phone):</div><div dir="auto"><br></div>To know if a device is connected or not you will have to make a dbus query to the kdeconnect daemon. <div dir="auto"><br></div><div dir="auto">As a unique device identifier you can use the device id (which you can also get through dbus).</div><div dir="auto"><br></div><div dir="auto">Plugins are only loaded for connected devices.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On May 24, 2017 06:39, "Simon Redman" <<a href="mailto:simon@ergotech.com">simon@ergotech.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
Here are my thoughts about what kinds of data would be needed to keep<br>
track of contacts and accounts for the telepathy plugin:<br>
<br>
Data Needed for Contact:<br>
  * Contact Name - Human-readable name for this contact<br>
  * Phone Number - Identify the specific contact<br>
    ° Maybe we never use this, but easier to plumb it through now and<br>
never use it than band-aid it on later...<br>
    ° What about contacts with multiple numbers?<br>
      - VCard entries have a "type" parameter. "Cell","Home",etc.<br>
  * Contact Photo<br>
    ° Added to the wishlist...<br>
    ° TelepathyQt library's Contact class has a requestAvatarData()<br>
method. Maybe we could hook into that to send a request to the phone for<br>
the image.<br>
<br>
Data Needed for Account:<br>
  * Device_ID - Some key unique to a device used only within KDE Connect<br>
    ° Differentiate accounts so we can choose which one to use to respond<br>
  * Device Name - Attach a human-readable name to the account<br>
  * Don't care about phone number associated with device<br>
    ° We just send a message to a device and say "Send this"<br>
    ° What to do about multi-SIM phones?<br>
<br>
Comments on more or less data to use to represent a contact or an<br>
account are appreciated!<br>
<br>
My problem is: How should the information for the account get from KDE<br>
Connect to telepathy-kdeconnect? One thing I've noticed so far is that<br>
there is an instance of each plugin per device, so "Send me all the<br>
connected devices" probably won't work. Do plugins always exist when a<br>
device is paired, even if it is disconnected? (Do plugins have a way to<br>
query whether their associated device is connected?)<br>
<br>
It is almost starting to look like we need a new (KDE Connect) plugin<br>
which supports sending/receiving SMS as well as getting the contact<br>
information. This plugin could be more tightly bound to Telepathy than<br>
the current Telephony plugin, such that its only role is to communicate<br>
with the telepathy plugin.<br>
<br>
Thanks,<br>
Simon<br>
<br>
</blockquote></div></div>