| sicelo | arno11: and anyone interested in solving N900/omap3 power management issues - hope some of what Andreas is working on here, https://marc.info/?l=linux-omap&m=173136502302181&w=2, can be directly applicable. i seem to recall that SPI was also our worst offender | 04:53 |
|---|---|---|
| sicelo | https://github.com/maemo-leste/bugtracker/issues/545#issuecomment-980458784 | 04:53 |
| Wizzup | the main issues I am finding these days is that sometimes the modem drops from the usb bus and leste doesn't make this obvious to the user: things keep working and it will even still show the signal bar | 10:41 |
| Wizzup | I suppose the connui-cellular rework might fix this | 10:41 |
| arno11 | sicelo: sounds promising | 14:20 |
| arno11 | Wizzup: is it only on d4 or on all devices ? | 14:22 |
| Wizzup | probably all, but the modem doesn't disappear as frequently on n900 | 14:25 |
| Wizzup | it happens maybe once every few weeks | 14:25 |
| Wizzup | I am pretty sure fmg's work will at least make us aware of this problem | 14:25 |
| arno11 | ok | 14:27 |
| dsc_ | freemangordon: hi | 15:56 |
| dsc_ | looking for a sgianl related to contacts changing attributes like presence, I think its contactChanged or some such | 15:57 |
| arno11 | Wizzup: btw most of the time when i lock the screen now, hsdpa connection is lost | 16:20 |
| arno11 | previously i was able to keep the connection for hours, even days | 16:21 |
| Wizzup | wow, what :D | 16:24 |
| arno11 | *even days with a charger ofc | 16:28 |
| arno11 | i wonder what happened recently | 16:30 |
| freemangordon | dsc_: is that related to abook? | 16:55 |
| freemangordon | Wizzup: re connui-cell - finally I am back on it since Sunday | 16:55 |
| freemangordon | making steady progress, hopefully will hit -devel by the end of the week | 16:56 |
| dsc_ | freemangordon: looking for a way to track changes to contacts, since contacts are managed by abook, I suspect there may be a signal there somewhere | 16:59 |
| dsc_ | to detect incoming friend requests for example | 17:00 |
| freemangordon | dsc_: see https://github.com/maemo-leste/osso-abook/blob/master/lib/osso-abook-contact.c#L115 | 17:03 |
| freemangordon | G_IMPLEMENT_INTERFACE() means inheritance, in c++ terms | 17:03 |
| freemangordon | so, OssoABookContact is also OssoABookPresence | 17:04 |
| dsc_ | hmm | 17:04 |
| freemangordon | also, OssoABookContact does https://github.com/maemo-leste/osso-abook/blob/master/lib/osso-abook-contact.c#L201 for all properties changed | 17:06 |
| dsc_ | ok ill try something | 17:06 |
| dsc_ | yes :) thats what I noticed just now | 17:07 |
| freemangordon | so you should connect to "notify::presence-status" | 17:07 |
| freemangordon | connecting to "notify::" is a bit tricky | 17:07 |
| freemangordon | callback must have signature: | 17:08 |
| freemangordon | void (*cb)(GObject *gobject, GParamSpec *pspec, gpointer user_data) | 17:08 |
| dsc_ | yes, i was looking at what is user_data | 17:10 |
| dsc_ | but ill figure it out thanks | 17:10 |
| freemangordon | sec, will provide an example | 17:10 |
| freemangordon | see https://github.com/maemo-leste/osso-abook/blob/master/lib/osso-abook-button.c#L969 | 17:11 |
| freemangordon | user_data is the data you want to be passed to callback | 17:12 |
| dsc_ | oh. | 17:12 |
| freemangordon | usually pointer to structure, but can pass this if callback is static member | 17:12 |
| dsc_ | ok that work will work fine | 17:15 |
| dsc_ | ok that will work fine* | 17:15 |
| dsc_ | the roster code from yesterday also works | 17:15 |
| dsc_ | freemangordon: this snprintf is annoying https://plak.infrapuin.nl/selif/je57ex3q.txt | 17:16 |
| freemangordon | don't use snprintf | 17:17 |
| freemangordon | see https://docs.gtk.org/glib/func.strdup_printf.html | 17:18 |
| dsc_ | alright | 17:18 |
| freemangordon | also, no need to do e_vcard_get_attribute | 17:18 |
| freemangordon | you can directly do osso_abook_contact_get_blocked(contact), for example | 17:19 |
| freemangordon | or osso_abook_contact_get_value() | 17:20 |
| dsc_ | its probably neccesary for values that are not binary | 17:20 |
| dsc_ | ah ok | 17:20 |
| freemangordon | you do osso_abook_contact_get_value(E_CONTACT(contact); | 17:20 |
| freemangordon | E_CONTACT(contact) casts from OssoABookContact to EContact | 17:21 |
| freemangordon | again, see https://github.com/maemo-leste/osso-abook/blob/master/lib/osso-abook-contact.c#L115 | 17:21 |
| freemangordon | implementing E_TYPE_CONTACT means that it inherits EContact | 17:22 |
| freemangordon | the same for the other interfaces/classes in the list | 17:22 |
| freemangordon | so you can safely do OSSO_ABOOK_AVATAR(contact) etc | 17:23 |
| freemangordon | and call functions in https://github.com/maemo-leste/osso-abook/blob/master/lib/osso-abook-avatar.h | 17:23 |
| dsc_ | alright | 17:23 |
| dsc_ | one question | 17:23 |
| freemangordon | keep in mind that you should get avatar of master contact, not roster contact | 17:23 |
| freemangordon | ? | 17:24 |
| dsc_ | should I be storing a list of contacts | 17:24 |
| dsc_ | in conversations | 17:24 |
| freemangordon | no | 17:24 |
| dsc_ | I reckon no | 17:24 |
| freemangordon | you can always retreive them from abook | 17:24 |
| dsc_ | i was wondering because we are connecting to callbacks and idk what happens when we g_list_free(contacts) | 17:25 |
| freemangordon | anyways it is storing all the contacts *and* their relations etc | 17:25 |
| freemangordon | all you see in addressbook application (and things you don't see) are at your disposal | 17:25 |
| freemangordon | no need to waste your time duplicating code | 17:25 |
| dsc_ | well | 17:26 |
| freemangordon | also, if you need some functionality and you can;t find it, please, first check with me if it is not already in abook | 17:26 |
| freemangordon | as it does lots of things | 17:26 |
| freemangordon | like, you can use OssoABookContact (or some other class) directly as clickable avatar that opens the contact details/actions | 17:28 |
| freemangordon | g_list_free() frees the list, not the data it contains | 17:29 |
| freemangordon | however, you shoudl g_object_ref(contact) if you want to be sure it would not disappear under your feet | 17:29 |
| dsc_ | ok, dont think it will be a problem | 17:30 |
| freemangordon | do not forget to unref once you don;t need it anymore | 17:30 |
| freemangordon | also, you must explicitly disconnect from signals you connected to when you don;t need the object anymore | 17:31 |
| freemangordon | a note: osso_abook_contact_get_uid() gets EBook contact uid | 17:32 |
| dsc_ | sure | 17:32 |
| dsc_ | i would have noticed that eventually hehe | 17:32 |
| freemangordon | sorry, I meant master contact uid | 17:33 |
| dsc_ | yes | 17:33 |
| freemangordon | IIUC | 17:33 |
| freemangordon | ok | 17:33 |
| dsc_ | ill look at this notify::presence-status | 17:33 |
| dsc_ | which applies to a OssoABookContact | 17:34 |
| freemangordon | mhm | 17:34 |
| dsc_ | or not? | 17:34 |
| freemangordon | yes, it does | 17:34 |
| dsc_ | ok | 17:35 |
| dsc_ | thanks | 17:35 |
| freemangordon | see https://github.com/maemo-leste/osso-abook/blob/master/lib/osso-abook-contact.c#L854 | 17:35 |
| dsc_ | actually | 17:35 |
| dsc_ | sorry I need more coffee | 17:36 |
| dsc_ | I'm looking for publication requests | 17:36 |
| dsc_ | hmm | 17:36 |
| * freemangordon hands dsc_ a cup of coffee | 17:36 | |
| dsc_ | presence-status might be something else | 17:36 |
| dsc_ | but maybe its enough | 17:36 |
| dsc_ | let me check | 17:36 |
| freemangordon | yeah, it is something else | 17:37 |
| freemangordon | lemme find what you need | 17:37 |
| freemangordon | dsc_: seems abook does not provide signals when published/blocked/etc has changed | 17:45 |
| freemangordon | but, you said TP already provides those signals? | 17:46 |
| freemangordon | lemme double-check | 17:47 |
| dsc_ | signals in TP are: subscriptionStateChanged, publishStateChanged, blockStatusChanged | 17:47 |
| dsc_ | these are Tp::Contact signals | 17:48 |
| freemangordon | do you need those connected for all contacts? | 17:48 |
| dsc_ | yes | 17:49 |
| dsc_ | but only if the connection manager has those capabilities | 17:49 |
| freemangordon | osso_abook_contact_presence_get_handle() will give you TP handle | 17:50 |
| dsc_ | ah ok | 17:50 |
| freemangordon | wait, wrong function | 17:51 |
| dsc_ | maybe there is a classmethod Tp::Contact::fromHandle() | 17:51 |
| freemangordon | osso_abook_presence_get_handle() | 17:51 |
| freemangordon | exactly | 17:51 |
| dsc_ | so if abook destroys a contact, I also need to know, I think | 17:54 |
| dsc_ | because I'm operating on it from tp-qt | 17:54 |
| freemangordon | if you ref it, it will not destroy it | 17:54 |
| dsc_ | ah ok | 17:54 |
| freemangordon | but yeah, you should be notified | 17:55 |
| freemangordon | don;t ask me how though :), have to llok in the code | 17:55 |
| freemangordon | *look | 17:55 |
| freemangordon | ok, at least tp-glib has https://telepathy.freedesktop.org/doc/telepathy-glib/telepathy-glib-simple-client-factory.html#tp-simple-client-factory-ensure-contact | 17:56 |
| dsc_ | ContactPtr ContactManager::ensureContact(uint bareHandle, const QString &id, const Features &features) | 17:57 |
| dsc_ | it seems to lookup this handle in some private dict | 17:58 |
| dsc_ | so dont think this is it | 17:59 |
| freemangordon | link? | 18:00 |
| dsc_ | https://github.com/TelepathyIM/telepathy-qt/blob/master/TelepathyQt/contact-manager.cpp#L1441 | 18:01 |
| dsc_ | https://github.com/TelepathyIM/telepathy-qt/blob/master/TelepathyQt/contact-manager.cpp#L1457 | 18:01 |
| dsc_ | well, this is contactManager | 18:01 |
| freemangordon | https://github.com/TelepathyIM/telepathy-qt/blob/master/TelepathyQt/contact-manager.cpp#L1448 | 18:01 |
| dsc_ | :) | 18:02 |
| freemangordon | if it does not find it, it calls connection manager | 18:02 |
| dsc_ | alright | 18:03 |
| dsc_ | ill try | 18:03 |
| freemangordon | see https://telepathy.freedesktop.org/doc/telepathy-qt/a08188.html | 18:04 |
| freemangordon | so, I think once you use the handle, you no more need abook contacts | 18:04 |
| freemangordon | but, my gut feeling tells me there must be a better way of watching for contacts changes | 18:05 |
| freemangordon | instead of keeping all the contacts in the system | 18:06 |
| dsc_ | my gut feeling is "freemangordon will implement subscriptionStateChanged, publishStateChanged, blockStatusChanged in abook :D" | 18:06 |
| freemangordon | no, TP should already provide that for you | 18:07 |
| freemangordon | tp_cli_connection_interface_contact_info_connect_to_contact_info_changed | 18:07 |
| dsc_ | just like abook has presence-status | 18:07 |
| freemangordon | https://telepathy.freedesktop.org/doc/telepathy-glib-0.24.x/telepathy-glib-connection-contact-info.html#tp-cli-connection-interface-contact-info-connect-to-contact-info-changed | 18:07 |
| dsc_ | uhmmm | 18:09 |
| dsc_ | yes that can work | 18:09 |
| freemangordon | thats what eds TP plugin uses | 18:10 |
| freemangordon | you just need to find Qt equivalent | 18:10 |
| freemangordon | btw, there is Tp::ContactManager::contactsForHandles() | 18:13 |
| dsc_ | its a bit annoying | 18:14 |
| dsc_ | lemme make a suggestion | 18:15 |
| dsc_ | https://github.com/maemo-leste/osso-abook/blob/1a52f8f650d566a0cd8ced10582178348feae808/lib/osso-abook-contact.c#L478-L483 | 18:15 |
| dsc_ | we add 2 conditions here for PUBLICATION and SUBSCRIPTION | 18:15 |
| dsc_ | so we can do | 18:15 |
| dsc_ | osso_abook_contact_notify(contact, "publication-status"); | 18:15 |
| dsc_ | at which point we have `notify::publication-status` | 18:16 |
| freemangordon | no, thats suboptimal | 18:16 |
| freemangordon | because you should get notified when contact changes and see what has changed | 18:17 |
| freemangordon | without keeping all the contacts around | 18:17 |
| freemangordon | what if contact appears or gets deleted? who will refresh your list? | 18:17 |
| dsc_ | abook should give me signals for new or removed contacts, no? | 18:19 |
| dsc_ | since abook manages all the contacts | 18:19 |
| dsc_ | basically, we're using abook where we would otherwise use tp-qt's contactManager | 18:19 |
| freemangordon | https://telepathy.freedesktop.org/doc/telepathy-qt/a09344.html | 18:22 |
| freemangordon | but yeah, I may consider adding that to abook | 18:22 |
| dsc_ | ok, lets think about it for a bit | 18:23 |
| freemangordon | BTW, did you check those 2 are properly set in vcard? | 18:25 |
| dsc_ | yes it works | 18:25 |
| freemangordon | great | 18:25 |
| freemangordon | ok, I will add those | 18:25 |
| freemangordon | will take me a while though | 18:25 |
| dsc_ | ehh | 18:25 |
| freemangordon | hmm? | 18:26 |
| dsc_ | sorry I lied, let me check | 18:26 |
| dsc_ | i checked the presence attribute | 18:26 |
| freemangordon | see https://github.com/maemo-leste/osso-abook/blob/1a52f8f650d566a0cd8ced10582178348feae808/lib/osso-abook-debug.c | 18:27 |
| freemangordon | hmm abook should already notify on contact update | 18:27 |
| freemangordon | and then you can just ask for blocked etc | 18:28 |
| freemangordon | dsc_: OssoABookAggregator | 18:29 |
| dsc_ | < freemangordon> BTW, did you check those 2 are properly set in vcard? <== they work, I checked | 18:30 |
| freemangordon | cool | 18:30 |
| dsc_ | freemangordon: what about OssoABookAggregator? | 18:30 |
| freemangordon | it provides contacts added/removed/changed signals | 18:30 |
| freemangordon | so, you can connect to those and check whatever needed as you receive them | 18:31 |
| freemangordon | instead of keeping contacts list | 18:31 |
| dsc_ | great | 18:31 |
| freemangordon | https://github.com/maemo-leste/osso-abook/blob/master/lib/osso-abook-roster.c#L630 | 18:34 |
| freemangordon | oops | 18:34 |
| freemangordon | not that one | 18:34 |
| freemangordon | this: https://github.com/maemo-leste/osso-abook/blob/master/lib/osso-abook-roster.c#L424 | 18:35 |
| dsc_ | ok, ill try | 18:35 |
| freemangordon | https://github.com/maemo-leste/osso-abook/blob/master/lib/osso-abook-roster.h#L55 | 18:36 |
| freemangordon | all callbacks have one more parameter (gpointer user_data) | 18:36 |
| freemangordon | so your contacts_changed cb should look like 'void contacts_changed_cb(OssoABookRoster *roster, OssoABookContact **contacts, gpointer user_data);' | 18:37 |
| dsc_ | freemangordon: https://plak.infrapuin.nl/selif/9ifpdr2s.txt | 19:54 |
| dsc_ | this does not trigger with for example presence changes (switching a contact from online to away) | 19:55 |
| dsc_ | I keep the roster/aggregator objects around, so thats not it | 19:57 |
| dsc_ | https://github.com/maemo-leste/osso-abook/blob/master/lib/osso-abook-roster.c#L630 | 19:59 |
| dsc_ | this is on an EBook* | 19:59 |
| dsc_ | maybe I should do that? | 19:59 |
| dsc_ | or EBookView* rather | 20:00 |
| freemangordon | yes, it should not get triggered for presence changes | 20:01 |
| freemangordon | as those come from telepathy, not as evcard | 20:01 |
| freemangordon | see if those get triggered for some vcard property change | 20:02 |
| freemangordon | like, change remote nick | 20:02 |
| freemangordon | or name, or whatever | 20:02 |
| dsc_ | I changed my avatar to a cute rabbit, it did not trigger the callback | 20:05 |
| dsc_ | name change (I think this is 'alias') also did not trigger it | 20:05 |
| freemangordon | your avatar? | 20:10 |
| dsc_ | profile picture | 20:10 |
| freemangordon | yes, I know what avatar is, the question is - what contact is that? | 20:11 |
| freemangordon | remote one? | 20:11 |
| dsc_ | yes | 20:11 |
| dsc_ | both contacts are already "friends" | 20:11 |
| freemangordon | please repeat with OSSO_ABOOK_DEBUG=all | 20:11 |
| freemangordon | and provide logs | 20:12 |
| freemangordon | G_MESSAGES_DEBUG=all OSSO_ABOOK_DEBUG=all | 20:13 |
| freemangordon | dsc_: what account is that? irc? | 20:15 |
| dsc_ | hmm ok sorry, it works now | 20:18 |
| dsc_ | not sure what happened | 20:18 |
| freemangordon | heh :) | 20:18 |
| dsc_ | ok cool | 20:18 |
| dsc_ | next up we have: accepting/denying friend requests | 20:20 |
| dsc_ | maybe relevant: https://github.com/maemo-leste/osso-abook/blob/1a52f8f650d566a0cd8ced10582178348feae808/lib/osso-abook-aggregator.c#L136 | 20:20 |
| freemangordon | no | 20:21 |
| freemangordon | you can't do that from abook | 20:21 |
| freemangordon | this shall be done by TP | 20:21 |
| dsc_ | alright, that's fine | 20:22 |
| dsc_ | bbl, thanks | 20:22 |
| sicelo | Wizzup: modem disappearing ... yes I've reported it before on D4. not yet seen it on N900 | 21:03 |
| sicelo | we need to check carefully how we react to ModemRemoved and similar signals. | 21:04 |
| sicelo | although I haven't experienced it on D4 in the last few weeks | 21:04 |
| freemangordon | sicelo: this is properly handled in the new connui-cell | 21:04 |
| sicelo | oh sweet | 21:05 |
| sicelo | sneak preview? :-) | 21:05 |
| freemangordon | no, sorry | 21:06 |
| freemangordon | by the end of the week | 21:06 |
| sicelo | sure | 21:06 |
Generated by irclog2html.py 2.17.0 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!