libera/#maemo-leste/ Monday, 2023-10-09

freemangordonuvos: "fixing" osso-addressbook to recognize event_type is a hack and not going to work. Event types are el plugin specific and not part of any API.07:36
freemangordonalso, I don;t see how we can distinguish between phone and SIP call07:45
uvos__freemangordon: there is RTCOM_EL_PLUGIN_CALL_TYPE_VOIP and RTCOM_EL_PLUGIN_CALL_TYPE_GSM10:12
uvos__yes you have to use the plugin to figure out what the type field is supposed to mean10:12
uvos__you also have to use the plugin to know what any of the fields in the database mean, the plugins do do this differently10:13
uvos__using the database directly like abook dose it broken, as can clearly be seen by the fact that it effectively hardcodes voip and gsm calls to not have a url in the remote_idenitifer field but then hardcodes all other types to be a uri10:15
uvos__now you could argue this whole "plugin determines the meaning of fields" thing is stupid, and you would be right10:15
uvos__its also really only half implemented10:15
uvos__but thats how it nokia did it, fairly defficant.10:16
uvos__we could change this by forgetting about the plugins and fixing the meaning of the database fields to allways be the same10:16
uvos__but the choise to break compatability with fremantle databases should be made consciously10:17
freemangordonuvos__: oh, seems we already have something here https://github.com/maemo-leste/rtcom-eventlogger-plugins/blob/master/src/call-plugin.c#L26612:43
freemangordonso we can just add vcard-field header when adding the event and I'll teach osso-abook to use it12:52
freemangordonsounds sane?12:52
uvos__not sure i grok what you want to add exactly13:02
uvos__a table of type -> field?13:02
freemangordonuvos__: I want to call rtcom_el_add_header("vcard-field", "tel") in sphone rtcomel plugin13:18
freemangordonhere https://github.com/maemo-leste/sphone/blob/master/src/modules/store-rtcom.c#L8313:18
freemangordon"Headers" table is already used as id->value table13:20
freemangordonhttps://github.com/maemo-leste/rtcom-eventlogger/blob/master/rtcom-eventlogger/eventlogger.h#L21413:23
uvos__freemangordon: ok thas fine for now13:27
uvos__freemangordon: eventually the sphone backends sheme (https://github.com/maemo-leste/sphone/blob/e4f6af0d4d744f189ea0382846a6c1d9789c112e/src/modapi/comm.h#L34) should porbubaly be used instead of "tel"13:27
uvos__also what about remote_uid when its not tel or sms13:28
uvos__shal sphone append the sheme from the backend like fremantle13:28
freemangordonwhat else it could be?13:28
uvos__or shal we fix remote_uid to never contain the theme?13:28
uvos__*sheme13:28
uvos__well tel:// and sms:// are still a wierd case where fremantle dosent prepend tel://  to remote_uid13:29
uvos__while it dose prepend skype:// for instance13:29
freemangordonit does not prepend scheme to anything I have here13:29
freemangordoni took my el db from fremantle13:29
freemangordonno skype calls there though13:30
uvos__hmm so why dose abook think the sheme should be in remote_uid?13:30
freemangordonmaybe some remnant frm the old times13:30
uvos__abooks code tries to determine the vcard field by handling remote_uid as a uri13:30
freemangordonno idea13:30
freemangordonyes13:30
uvos__ok13:31
freemangordonbut maybe some old version was working that way13:31
uvos__so sphone shal never prepend, even when i add support for the backend sheme handling13:31
uvos__ok13:31
freemangordonanyway, if you check call plugin code, there is a special support for vcard-field event value13:31
uvos__sounds sane13:31
freemangordonmhm13:31
freemangordonok, will make a PR when I have it working13:32
uvos__ok13:32
uvos__great13:32
freemangordondid you try latest changes?13:32
freemangordonlibhildonmime etc13:32
uvos__no not yet sorry, im out of town13:32
freemangordonok13:32
freemangordonok, back to RL work, ttyl13:32
uvos__ttyl13:32
Wizzupthe librem made it safely to my place18:42
freemangordonuvos: so, there is no way now to get the currently used scheme (in sphone that is)?18:45
maxwellduvos, thank you for explanations. i am glad leste itself doesn't use much memory now. because i myself try to not use things that use lots of memory.18:52
maxwelldeven on pinebook, when i run gentoo, if i see this is hard/slow to compile, i just don't use it anywhere, on a powerful laptop too.18:52
maxwelldi am a windowmaker/x11/xterm user with pidgin on laptops, well browser is a problem but i am trying to use netsurf and only rarely, if very necessary visit websites that are heavy and slow and have lots of js and ads etc.18:52
Wizzupfreemangordon: with my sphone plugin each tp account is it's own sphone backend19:03
freemangordonok, but can I get backend uri scheme somehow?19:05
WizzupI will answer that tomorrow, I have a 7am meeting and it's 1:07am :)19:07
freemangordonok19:07
freemangordon:)19:07
Wizzupbackend_id = id;19:08
Wizzupbackend_name = strdup(backend_id.toStdString().c_str());19:08
Wizzupsphone_backend_id = sphone_comm_add_backend(backend_name, schemes,BACKEND_FLAG_CALL);19:08
WizzupI think that might just be the full backend id as in telepathy qt19:08
freemangordonno, I need uri scheme like "tel", "sms", etc19:09
Wizzupyou can get it using that I guess, not sure about scheme, I think it might register it, will need to check tomorrow19:13
Wizzupcall_properties->needs_route = backend->type == "tel"19:13
Wizzupoh, nevermind, that is the tp backend and not sphone backend I think19:13
Wizzupoh, also for sphone you register it with a scheme19:14
Wizzupso probably there is a way to get it19:14
Wizzupstatic const Scheme call_scheme = { .scheme = (char*)"tel", .flags = BACKEND_FLAG_CALL19:14
Wizzup};19:14
freemangordonit is a list of schemes unfortunately19:14
freemangordonwe need uvos here I guess19:15
Wizzuphe'll be back soon enough :)19:15
* Wizzup zzz19:15
uvosfreemangordon: this bit isent finished yet, sphone's backends register shemes, but they are not used, except to find a backend to use when sphone is called by the xdg-open dispatcher20:27
uvosthere currently is no api for sphones modules to read a backends shemes.20:27
freemangordonok20:27
uvosthat the schemes are a list20:28
freemangordonthough so and hardcoded "tel"20:28
uvosyes20:28
uvosfor now untill i finish this bit20:28
freemangordonmhm20:28
freemangordonhttps://github.com/maemo-leste/sphone/pull/620:29
uvosthe fact that it is a list is just a hedge against the possibility that there could be several schemes that mean the same thing20:29
uvoseatch backend is expected to be one protocoll20:29
uvosso once this is finished using the first scheme in the list for the given backend should be safe20:29
freemangordonuvos: BTW, I would have used hash table in   sphone_comm_get_backend()20:30
uvosassuming the flags match20:30
uvosfreemangordon: sure yeah20:30
uvoswould be better20:30
freemangordonuvos: when the (scheme) API is there, we will just unhardcode it20:30
uvosyup20:31
freemangordoncould you have a glance ove the PR so I can push osso-addressbook changes?20:31
uvosfreemangordon: "sphone_module_log(LL_ERR, "failed to add event to rtcom: %s");" <-- hmm20:33
freemangordonuh20:33
freemangordonsorry about that20:33
uvosnp20:33
freemangordonwill fix in a moment20:33
freemangordonthough I wonder why compiler said nothing20:34
uvosmaybe missing decorator20:35
uvoshttps://github.com/maemo-leste/sphone/blob/e4f6af0d4d744f189ea0382846a6c1d9789c112e/src/modapi/sphone-log.h#L4220:36
uvoshmm maybe the fact tht its through a macro trips it up?20:36
uvosnot sure20:36
freemangordonme neither20:36
uvosyour hardcodeing tel also for messages20:40
uvoswhich is wrong, should be sms://20:41
freemangordonno20:41
freemangordonthis is not uri scheme ;)20:41
uvossms dosent translate to the same vcard sheme?20:42
freemangordonbut vcard-field20:42
uvos*field20:42
freemangordonvcard-field is not scheme20:42
freemangordonand sms, phone, tel, callto schemes, all translate to EVC_TEL20:42
uvosok but my understanding was we where translateing schemes to vcard fields here20:43
uvos(which is something we need to do)20:43
uvossomewhere20:43
uvosif sphone needs to do this thats fine, but obv i need to be aware :P20:43
freemangordonso? we support sms:// and tel:// schemes. right? both are mapped to EVC_TEL vcard-field20:44
uvossure, but atm sphone knows what sheme a backend supports20:44
uvosbut not what vcard fields that is20:44
freemangordonand that's fine20:44
freemangordonbut we have no API to know which scheme was used for the particular event20:45
uvosright, its just that later when we do have sutch api, we also need something to translate the scheme to vcard fields20:45
freemangordonright20:45
freemangordonthe same like what _get_vcard_field_from_uri() in osso-addressbook does20:46
uvosright, just more robust, to put it mildly :P20:47
freemangordonmhm20:47
freemangordonor more complete I would say20:47
freemangordonmaybe each backend shall provide mapping function20:47
freemangordondunno how much you want eds compatibility20:48
uvosnot sure yet20:48
uvoslater20:48
freemangordonuvos: PRT updated20:48
freemangordon*PR20:49
uvoslooks good20:50
freemangordonok, please make a release when you have time, I will make a new release for abook20:55
uvoscertenly20:56

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