libera/#maemo-leste/ Thursday, 2024-11-14

dsc_freemangordon: im almost finished, a bit stuck with accept/deny/block contacts. We decided to do this via Tp, and I already have the TP code for it (from my earlier work) but it requires the Tp::ContactManager. Wondering if its possible without the ContactManager.00:54
dsc_in order to have a ContactManager, there needs to be a Tp::Connection, which for 1:1 means TextChannel00:55
dsc_eh, its not really an issue I guess.. just wondering if I can do without.00:56
dsc_ill just call ensureConnection()00:58
dsc_but.. creating a Tp::ContactPtr from a handle would be nice.01:17
dsc_nvm it all works, ill commit tomorrow01:25
inky> Wizzup: modem disappearing ... yes I've reported it before on D4. not yet seen it on N90004:15
inkyi wish we could make it vanish and not communicate to cellular towers.04:15
siceloinky: power it off through ofono, and maybe also unload its driver...06:21
freemangordondsc_: how would you accept etc without having a connection?07:05
freemangordonand yes, you should be able to 'adopt' tp contact handle in Qt::TP09:05
freemangordonhmm, I think https://telepathy.freedesktop.org/doc/telepathy-qt/a09296.html#aa47cba559bbbe54b170bec5f3e044801 is what you need09:06
inkysicelo: i think i only can put the modem to sleep via airplane mode.17:07
inkybut we have no 'tablet mode' as in fremantle.17:08
inkyi tried to port tablet mode applet, but it was writing some nokia.something messages to dbus17:08
inkyit doesnt work on leste17:08
inkyit doesnt work on leste.17:08
dsc_freemangordon1: https://plak.infrapuin.nl/selif/thhhyq42.txt17:29
dsc_do you have an idea why presence prints as 'null', but only in the callback function17:29
dsc_e_contact seems to not work17:30
dsc_contact works though, like `osso_abook_contact_get_persistent_uid(contact);`17:30
dsc_or alternatively, how can I loop contacts given a set of uids (osso_abook_aggregator_list_roster_contacts loops all)17:51
dsc_I want to prevent fetching *all* contacts during the contact change signal17:52
dsc_the callback does not provide me with mutation, nor with the ability to access ebook attributes :(17:52
freemangordon1dsc_: re presence thing - what do you want to achieve?17:56
freemangordon1and for sure e_contact works17:56
freemangordon1could you try to get the vcard of the changed contact, use   OSSO_ABOOK_DUMP_VCARD(TP, E_VCARD(*contact), NULL);17:59
freemangordon1start the application with G_MESSAGES_DEBUG=all  OSSO_ABOOK_DEBUG=tp17:59
freemangordondsc_: looping through all teh contacts is not effective18:01
freemangordonhmm ,it is possible that callback is receiving master contact, not roster one18:03
freemangordonosso_abook_contact_find_roster_contacts() or the likes18:03
dsc_thanks18:03
freemangordondsc_: please, dump vcard first to see which exactly contact you are signaled for18:06
dsc_yes18:06
dsc_OSSO_ABOOK_DUMP_VCARD(TP, E_VCARD(*contact), NULL); yields no results18:06
freemangordonG_MESSAGES_DEBUG=all  OSSO_ABOOK_DEBUG=tp18:06
freemangordonit will print it on the console18:07
dsc_freemangordon: https://plak.infrapuin.nl/selif/be9raut2.txt18:08
dsc_im expecting this vcard dump between the 2 "done"18:08
freemangordonhmm, weird18:09
dsc_https://plak.infrapuin.nl/selif/2asy2eyt.txt18:09
freemangordontry with G_MESSAGES_DEBUG=all  OSSO_ABOOK_DEBUG=all18:09
dsc_yes it was all, all18:10
dsc_let me try OSSO_ABOOK_DUMP_VCARD(TP, E_VCARD(*contacts), NULL);18:10
dsc_no results18:10
freemangordonwait, that can't be18:11
freemangordondsc_:   please call osso_abook_debug_init() in your main ;)18:12
freemangordonactually18:12
freemangordonis   osso_abook_init() called?18:12
dsc_osso_abook_init_with_name("conversations", NULL);18:12
dsc_yes18:12
freemangordonweird18:13
dsc_ill try osso_abook_debug_init18:13
freemangordonno need18:13
freemangordoninit calls it already18:13
freemangordongimme a minute18:13
freemangordondsc_: try to dump the result of   osso_abook_contact_to_string()18:17
freemangordonformat   is EVC_FORMAT_VCARD_3018:18
freemangordonbrb, dinner18:18
dsc_https://plak.infrapuin.nl/selif/39wyirkv.txt18:23
dsc_i think this may be due to differences between 'master contact' and 'roster contact'18:27
dsc_but only guessing18:27
freemangordonno, that's roster contact18:39
freemangordonbut, I think you don;t see presence, because you are not authorized to see it18:40
dsc_i trigger this signal by switching from online<->away18:42
freemangordonso, what does   osso_abook_contact_can_request_auth() return for that contact?18:42
dsc_(on the remote counterparty)18:42
freemangordonI understand18:42
freemangordonbut, you are not getting contact presence that way18:43
freemangordontry with   osso_abook_presence_get_presence_type(OSSO_ABOOK_PRESENCE(*contact))18:44
dsc_ok sec18:44
freemangordonwell, abook knows about presence change18:49
freemangordondsc_bla(haze/jabber/stevejobs_40xmpp_2ewajer_2eorg0-dsc@xmpp.is) - presence type changed (available => away)18:49
dsc_yes18:49
freemangordonI suspect vcard presence is valid only when eds plugin updates ebook18:50
freemangordonbut not for contact itself18:50
dsc_ok18:50
dsc_        OssoABookPresence *presence = OSSO_ABOOK_PRESENCE(*contacts);18:50
dsc_        TpConnectionPresenceType presenceType = osso_abook_presence_get_presence_type(presence);18:50
dsc_this works18:50
freemangordonmhm18:50
dsc_https://plak.infrapuin.nl/selif/x31ueru0.txt18:50
freemangordonget_ blocked/subscribed/published etc shall work too18:51
freemangordonheh18:51
dsc_ok ill check18:51
freemangordondsc_: use   p, li { white-space: pre-wrap; }  tp_connection_presence_type_get_name18:52
dsc_nice18:53
freemangordonto convert enum to string18:53
freemangordonsee tp-glib-enums.h18:54
freemangordonand osso-abook-enums.h18:54
freemangordonyou also have tp_connection_presence_type_get_nick()18:55
freemangordonwhich will return "Away", "Online", etc18:55
dsc_from what package is this 'tp_connection_presence_type_get_name' ?18:56
freemangordonosso-abook18:56
dsc_grep -r --include="*.h" 'tp_connection_presence_type_get_name' /usr18:56
freemangordonlemme check if it is distributed18:56
dsc_nothing18:56
dsc_https://github.com/search?q=tp_connection_presence_type_get_name&type=code18:56
freemangordonugh, maybe it is not included in -devel18:56
dsc_github also empty :d18:56
freemangordonit is generated file18:57
dsc_ah ok18:57
freemangordonhmm, ok, it is not distributed18:58
freemangordonlemme check if 'original' abook distributes it18:58
freemangordondsc_: no :(19:00
freemangordonI wonder if we shall distribute that19:00
freemangordondsc_: unless strictly neede, I would rather not distribute it19:01
freemangordonanyways it is easily generated by whoever needs it19:01
freemangordonif you need it, see https://github.com/maemo-leste/osso-abook/blob/master/lib/Makefile.am#L23519:04
freemangordonbut I guess Qt::TP already has it19:04
dsc_im fine with my 12 line switch block19:05
freemangordonI guess it is for debugging only19:05
freemangordonhttps://telepathy.freedesktop.org/doc/telepathy-qt/a08744.html19:06
dsc_alright19:08
freemangordondsc_: what do you need presence for?19:09
freemangordonremember, anything contact related for ui is already in abook, so most-probably you just need to use it19:11
dsc_i do not, but for testing its easy to trigger contactChanged by changing contact presence19:11
freemangordonok19:11
dsc_so yes you are right19:11
dsc_hmm19:11
freemangordonhmm?19:11
dsc_its about publication/presence19:12
dsc_no19:12
dsc_publication/subscription19:12
freemangordonyou get it by calling the relevant functions?19:12
dsc_yes19:12
dsc_lets see19:12
dsc_< freemangordon> get_ blocked/subscribed/published etc shall work too19:12
freemangordonmakes sense, as those OSSO_ABOOK_VCA_XXX are for internal use only19:13
dsc_which are not in maemo.org/api_refs/5.0/5.0-final/libosso-abook/OssoABookContact.html19:13
dsc_which are not in https://maemo.org/api_refs/5.0/5.0-final/libosso-abook/OssoABookContact.html19:13
dsc_these functions*19:13
freemangordonsure, they are presence19:14
dsc_sorry I'm having trouble forming coherent sentences :P19:14
freemangordonhttps://maemo.org/api_refs/5.0/5.0-final/libosso-abook/libosso-abook-osso-abook-presence.html19:14
dsc_ah ok19:14
dsc_cool19:14
dsc_thanks19:14
freemangordontolya, think of that API as c++ with class inheritance19:14
freemangordonsee https://maemo.org/api_refs/5.0/5.0-final/libosso-abook/OssoABookContact.html19:15
freemangordonObject Hierarchy/Implemented Interfaces19:15
dsc_:>19:16
dsc_freemangordon: is there a 'convert enum to string' for OssoABookPresenceState ?19:29
dsc_https://maemo.org/api_refs/5.0/5.0-final/libosso-abook/libosso-abook-osso-abook-presence.html#OssoABookPresenceState19:29
dsc_its not really needed per se, just wondering19:30
freemangordonshould be, lemme check19:34
freemangordonosso_abook_presence_state_get_name19:35
freemangordonosso_abook_presence_state_get_nick19:35
freemangordonbut, don;t use that for UI19:35
joergFYI: I took down bugs.m.o - please holler if you *really* used this recently19:40
freemangordonI doubt it's been used for the last years19:41
joergyep19:41
freemangordonthere were some useful things there, however, does not worth keeping it up19:42
freemangordonthis is with my bugs.maemo.org maintainer hat on ;)19:42
freemangordonthough I think you may keep VM image around for some time19:43
freemangordonjoerg: as a side note - thanks for taking care of those things, retired or not :)19:44
joergI just deleted the /etc/apache2/sites-enabled/* symlinks for bugs.m.o19:44
freemangordonVM still runs?19:44
joergb.m.o and w.m.o are same server19:45
freemangordonah19:45
freemangordonweird, my public key was denied19:45
freemangordonah, roght19:45
joerghm?19:45
freemangordon*right19:45
freemangordonwiki and bugs are same host19:45
joergy4es19:46
freemangordonI don't have ssh access to them19:46
joergyou should19:46
freemangordonno, why should I19:46
joergyou had19:46
freemangordonI am bugzilla maintainer of bmo, not sever admin19:46
freemangordonanyway19:47
joergroot@wiki:/etc/apache2/sites-enabled# id freemangordon19:47
joerguid=1009(freemangordon) gid=1009(freemangordon) groups=1009(freemangordon),27(sudo)19:47
freemangordonoh, I am trying with fmg, not freemangordon :D19:47
freemangordonheh:19:48
freemangordonLast login: Tue Dec 30 10:14:18 2014 from 46.249.74.2319:48
freemangordonfreemangordon@wiki:~$19:48
joerg:->19:48
freemangordonten years ago, eh?19:48
joerghehe19:48
dsc_freemangordon: hi20:08
dsc_https://plak.infrapuin.nl/selif/im7opi0g.txt20:09
dsc_it prints '1'20:09
dsc_which is20:09
dsc_OSSO_ABOOK_PRESENCE_STATE_NO20:09
dsc_which is incorrect20:09
dsc_[D] [tp.cpp::172] local_uid "haze/jabber/stevejobs_40xmpp_2ewajer_2eorg0"20:10
dsc_[D] [tp.cpp::173] remote_uid "dsc@xmpp.is"20:10
dsc_[D] [tp.cpp::174] presence "available"20:10
dsc_[D] [tp.cpp::175] subscribed "yes"20:10
dsc_[D] [tp.cpp::176] published "yes"20:10
dsc_thats the actual status20:10
freemangordondsc_: I am not sure what OSSO_ABOOK_PRESENCE_STATE_NO is supposed to mean20:49
freemangordonI don't think presence state == presence status20:49
dsc_https://maemo.org/api_refs/5.0/5.0-final/libosso-abook/libosso-abook-osso-abook-presence.html#osso-abook-presence-get-published20:51
dsc_yes/no/local-pending/remote-pending is from Tp I guess20:51
dsc_I also saw them in Tp20:51
freemangordonmhm20:51
freemangordonI am not sure I grok them, lemme try20:51
dsc_thx20:52
freemangordonok, will need some time to debug that20:58
freemangordonhow to reproduce?20:58
dsc_sec20:59
dsc_https://plak.infrapuin.nl/selif/tz2t41iz.txt21:02
dsc_something like this (still needs main())21:02
dsc_and then21:03
dsc_have a XMPP account with haze, where you have friended someone21:03
dsc_and then change online<->away on the remote contact21:03
dsc_expected state is 'yes' for both21:04
dsc_for `osso_abook_presence_get_published` and the other21:05
dsc_OssoABookContact *contact = static_cast<OssoABookContact *>(*contacts);21:05
dsc_in the while21:05
dsc_this method gives the correct attributes: https://plak.infrapuin.nl/selif/b6yknv4w.txt (simplified)21:12
dsc_dont call it from the callback21:13
freemangordonok, lemme try to debug your example21:26
freemangordonwhat remote change do I need? just away/available change?21:26
dsc_yes21:29
freemangordonok, thanks21:29
freemangordondsc_: there is a bug on abook, will take some time to fix it properly23:53
freemangordon*in abook23:53

Generated by irclog2html.py 2.17.0 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!