**** BEGIN LOGGING AT Tue Jul 27 02:59:56 2010 Jul 27 09:18:48 anybody know how to make hfpmodem actually do something? I've been reading the source and everything else [hfpmodem] Driver=hfpmodem in /usr/local/etc/ofono/modem.conf doesn't appear to work, neither does adding HF and HFAG with sdptool or trying to conenct from phone Jul 27 09:19:18 this is current git running from the source tree Jul 27 09:31:56 okay, so ./bootstrap followed by configure doesn't appear to work, ./bootstrap-configure is required Jul 27 09:45:06 okay, I do have dbus 1.3 so I'm not sure what's going on, but it's reaching the return -BADF in plugins/hfp.c Jul 27 09:47:35 no it's 1.2.16 and ubuntu is lying about the abi or some other weirdness, I guess I'm installing dbus from source Jul 27 11:37:59 it worked, had to upgrade to bluez git, dbus-1.3.xx and repair after the service uuid was registered correctly Jul 27 11:38:06 I think I can make calls now, we'll see Jul 27 17:25:03 inakypg: I'm starting to look at your sms work, is everything on master branch? Jul 27 17:25:20 jprvita: yes Jul 27 17:25:35 i see a smsdbus branch but it's based on a very old commit from upstream Jul 27 17:25:43 ok, tks Jul 27 18:17:38 balrog-k1n: here? Jul 27 18:17:59 denkenz: yep Jul 27 18:18:18 So I'm looking at the stkagent.[ch] patches Jul 27 18:18:34 I'm wondering whether we can encapsulate the calling of Agent methods completely inside it Jul 27 18:18:43 e.g. stk_agent_request_selection() Jul 27 18:18:52 stk_agent_display_text() Jul 27 18:18:54 etc Jul 27 18:19:16 i guess we could, but there will be many Jul 27 18:19:52 To me that seems cleaner, because we can also typecheck the arguments and sanitize the ouput from the agent Jul 27 18:20:00 e.g. get_key returns a single UTF8 char, etc Jul 27 18:20:06 there will be even more call than there are currently in stk-api.txt Jul 27 18:20:33 we can also sanitize in stk.c Jul 27 18:20:33 I know, but all this has to be handled somewhere anyway Jul 27 18:20:59 Sure, but this makes result handling from stkagent useless Jul 27 18:21:07 You're doing it inside stkagent.c and then again in stk.c Jul 27 18:21:29 well yeah, in stkagent.c i'm not looking at the contents of a successful reply Jul 27 18:22:01 Yeah, so I think this can be all made cleaner Jul 27 18:22:14 The only sticky point is dbus marshaling of menus Jul 27 18:22:55 because they will be shared between stkagent.c and stk.c? Jul 27 18:23:46 inakypg: unit/test-sms-msg-id.c:25: error: no previous declaration for ‘test_fatal_log’ Jul 27 18:23:58 are you using --enable-maintainer-mode? Jul 27 18:24:19 It enables more warnings and treat warnings as errors, so we can put the compiler to work for us :) Jul 27 18:25:00 it's complaining because you should use static for that function Jul 27 18:25:00 denkenz: the menu utils can go in stkutil.c Jul 27 18:25:35 balrog-k1n: Correct, sharing is a bit nasty Jul 27 18:25:51 If we do the marshaling in stkutil.c then we introduce a dependency there Jul 27 18:26:47 i've fixed that one, but I've found more header problems on src/sms.c Jul 27 18:27:14 denkenz: oh right, we don't want to link the unit tests against dbus Jul 27 18:27:27 I guess you've forgot to declare some functions / structs on include/sms.h Jul 27 18:28:10 balrog-k1n: Yep, so my thinking is that maybe the stk_menu struct should be simplified to use string, int pair Jul 27 18:28:26 balrog-k1n: And we introduce a new marshal function for such string, int pair in dbus.c Jul 27 18:29:15 i think it's simpler to just move the marshalling function to stkagent.c and make it public so stk.c can use it Jul 27 18:31:04 Simpler yes, but stk_menu is way too complicated Jul 27 18:32:04 It needs to be simplified down to string title, vector> items and some of those gbooleans you have Jul 27 18:32:46 if it's going to use GSList it'll just make it worse :) Jul 27 18:33:18 Use an array of struct string_int_pair Jul 27 18:33:29 I don't understand why everyone hates GSList ;) Jul 27 18:33:53 You'd rather be picking apart a very low level data structure as opposed to dealing with strings? Jeez Jul 27 18:34:16 i personally hate it because of the number of mallocs to create a GSList :) Jul 27 18:34:46 balrog-k1n: GLib has GPtrArray and should also have a string array thingy. Jul 27 18:35:15 well, C alrady has arrays Jul 27 18:35:37 balrog-k1n: I don't see the point of worrying about that, you will need to run the items and the title through Kristen's magic html converter anyway Jul 27 18:35:43 So I think your concern is misplaced Jul 27 18:35:46 Sure, but you have to grow them manually if needed. If you know the size of front, everything is fine. Jul 27 18:35:46 ah the string array functions in Glib are nice Jul 27 18:36:49 holtmann: if i need to grow them then GSList is ok, but in this case it's just a constant size array Jul 27 18:37:35 Again, its fine to use an array too Jul 27 18:37:42 We can then g_strfreev it Jul 27 18:38:04 However, you still need to malloc everything because html converter will do that Jul 27 18:40:13 denkenz: if we move all the request handling to stkagent.c we will need a struct for each request's parameters and one for each response (or a function typedef) Jul 27 18:40:35 Function typedef is fine, e.g. see bluez/src/agent.h Jul 27 18:41:11 yes, but iirc bluez just has one or two agent requests, and stk-api.txt already has about 10 Jul 27 18:41:26 Sure, but I want the code readable Jul 27 18:41:33 So if we have to do more work, so be it Jul 27 18:42:13 Also remember that we will most likely re-use stk agent in other parts Jul 27 18:42:27 So that will pay off anyway Jul 27 18:42:49 if we're going to re-use it then we should not put more stk-specific stuff in it Jul 27 18:43:15 but i don't think there's so much to re-use anyway Jul 27 18:44:54 ok, what i like about the current code is that adding a new command is pretty simple, so it's extensible Jul 27 18:45:17 if we move things to stkagent.c, everytime you add a new command you'll need changes in both files and in the header Jul 27 18:45:40 Its not like we're going to be adding any new commands Jul 27 18:46:17 And right now what I'm seeing is a mess of functions between two files trying to cooperate Jul 27 18:46:19 we'll at least need to add Get Input, Get Inkey, Set Up Call Jul 27 18:46:23 e.g. a disaster area Jul 27 18:47:00 ok, let's change it Jul 27 18:47:02 but it's no soooo bad :) Jul 27 18:47:24 Lets just try it, maybe I'm wrong Jul 27 18:47:33 But in the end I don't think the added code will be all that much Jul 27 18:48:21 Just all the nasty validation crap will be off in one file, so it doesn't clutter up stk.c logic Jul 27 18:49:12 And if possible, lets make stk_agent structure opaque Jul 27 18:49:47 ok, i can add the same calls that bluez had, i just don't see much point Jul 27 18:49:51 has* Jul 27 18:50:04 Don't trust BlueZ too much here. Jul 27 18:50:36 We were the first one using agent style D-Bus and might have still some craziness in there. Jul 27 18:51:03 Craziness yes, layout of the .c files is fine Jul 27 18:51:35 Lets just treat stkagent as another class with an API Jul 27 18:51:38 i'm just talking about making the structure opaque, maybe it makes sense but it changes direct accesses to calls (inherently slower for no reason, but not a very big deal) Jul 27 18:51:56 Then maybe you have too many accesses ;) Jul 27 18:51:57 i.e. java style Jul 27 18:54:14 The only ones I buy are path and bus for UnregisterAgent call, and performance isn't really a consideration there Jul 27 18:55:01 denkenz: do you have a minute to talk about EFimg and EFiidf? Jul 27 18:55:11 kristenc: Sure Jul 27 18:55:46 yeah, there are only three accesses, the two you mentioned and one checking if any request is running i think (so just need to make app_agent_busy() public) Jul 27 18:55:46 denkenz: you mention in the TODO that you want all the icons automatically read and made available via dbus. Jul 27 18:56:08 but presumably we could have a lot of images to read, and it is slow to read from the sim. Jul 27 18:56:10 obviously not a big performance hit but there's still no reason to change them into calls Jul 27 18:56:40 and is it possible we have limited memory resources? I wonder if we should keep a cache of a few EFiidfs but maybe cap how much memory we spend on that Jul 27 18:56:54 and use an algorithm to evict them from the cache if necessary. Jul 27 18:56:58 what do you think? Jul 27 18:57:30 denkenz: Since we have GetIcon method call now. Can we not just lazy read them when needed and then cache them? Jul 27 18:57:46 We just need to have the list of available icon indexes up-front. Jul 27 18:57:52 So I thought about this some Jul 27 18:58:06 My personal suggestion is that EFimg should be read at startup Jul 27 18:58:10 we do we even need to expose all available icon indexes? Jul 27 18:58:41 And cached in memory semi-efficiently Jul 27 18:58:59 The reading of the actual data can be done on-demand (potentially _very_ slow) Jul 27 18:59:10 balrog-k1n: The UI needs this information if it wants to read these up-front. I don't want tons of GetIcon() calls for unavailable indexes. Jul 27 18:59:15 denkenz: reading the EFimg files at start up makes sense. They will not be very large. But then for the data files, I wonder if it would make sense to keep a small cache. Jul 27 19:00:07 So once the data is read we keep it in memory. Jul 27 19:00:09 Another possibility is to just read them at some point after startup and cache on disk Jul 27 19:00:32 The penalty of memory usage is only for UI applications actually using the icons. Jul 27 19:00:51 Not sure if our UI design will in the end. The iPhone for example doesn't care and seems to get away with it. Jul 27 19:00:51 they should be cached on disk transparently (unless they're modifiable but i don't think) Jul 27 19:00:59 denkenz: would we always be in an environment where we'd have plenty of disk space? Jul 27 19:01:17 Not necessarily. Jul 27 19:01:24 They probably wouldn't be cached, the EFiidf files are modifiable Jul 27 19:01:42 However, define plenty of space? I doubt SIM can store more than a few MB Jul 27 19:01:49 So we have to be careful here. I just say lets read them into memory in demand based on GetIcon() method call. Jul 27 19:02:14 But then again caching them in /var/lib/ofono// is also fine. Jul 27 19:02:30 Caching into /var/cache is better Jul 27 19:02:47 could we use a compile flag to define an appropriate cache size Jul 27 19:02:49 as far as i can see there can be max 256 icons, max 65536 icons, so 16MB max Jul 27 19:02:49 Would be better for sure, but I don't wanna pollute another directory. Jul 27 19:03:20 err max 65536 bytes per icon Jul 27 19:03:47 was there another limit? Jul 27 19:03:55 Nope, 16MB is correct Jul 27 19:04:06 But I doubt any SIM in existence does that Jul 27 19:04:24 The basic point here is that on-demand loading is going to be too slow Jul 27 19:04:44 We only want to do that in case an app is speedy gonzales and wants an icon before we're ready Jul 27 19:04:56 For simplicity and get this started, lets load them on-demand into memory. So first GetIcon call will be slow. After that it will be fast. Jul 27 19:05:07 Then we can optimize with disk caching from there. Jul 27 19:05:41 denkenz: Btw. we need a note for GetIcon() method call that it might take time when called first. So they set a proper D-Bus timeout value. Jul 27 19:06:04 Shrug, that is assumed for all calls Jul 27 19:06:31 if we're going to cache them, maybe it's easier to re-use the already existing cacheing and just tell it that these files can be treated like read-only Jul 27 19:06:52 except the cache needs to be removed every time a sim is inserted Jul 27 19:07:05 Or modem powered down Jul 27 19:07:19 Anyway, way too many cooks here right now Jul 27 19:07:35 kristenc: Do the EFimg + on demand loading and we go from there Jul 27 19:08:06 so either we want to cache them on disk or we don't, and just cache them in ram Jul 27 19:08:14 denkenz: That works as well. We can optimize that later ;) Jul 27 19:08:17 denkenz: ok. Jul 27 19:08:30 balrog-k1n: No, we want to cache them on disk for the duration of the oFono session Jul 27 19:08:39 balrog-k1n: The current EF caching is forever Jul 27 19:08:39 I still don't know if any of my SIM cards actually have icons on it. I never saw them. Jul 27 19:08:46 They do Jul 27 19:08:55 And the GetIcon API will need to be moved Jul 27 19:09:00 But that's for later Jul 27 19:09:01 denkenz: is it to save on RAM? Jul 27 19:09:09 balrog-k1n: Yeah Jul 27 19:09:20 ah Jul 27 19:10:58 denkenz: would you create a new file for icon related code, or just throw all this stuff into stkutil? Jul 27 19:11:43 kristenc: It depends on how much code there is, but definitely not stkutil, that one is getting overused Jul 27 19:12:06 GetIcon will be moved to the SIM atom Jul 27 19:12:17 so you might want to do your changes inside sim.c Jul 27 19:12:19 denkenz: that was my feeling too. Perhaps I'll create a new file and we can figure out where the stuff goes at the end. Jul 27 19:12:38 That would be fine as well Jul 27 19:12:45 denkenz: Then also the Icon index property needs to be moved. Jul 27 19:12:48 (meaning after we're all done we can sort out where stuff belongs). Jul 27 19:13:06 holtmann: I know Jul 27 19:13:14 denkenz: Question is why do you wanna move it? Jul 27 19:13:28 Because there are icons used outside STK Jul 27 19:13:32 Anything else besides SIM Toolkit application using it? I know it is generic SIM feature, but why bother. Jul 27 19:13:53 How are these icons used outside SIM Toolkit and where? Jul 27 19:13:59 Carrier Logos Jul 27 19:14:07 Crap. Jul 27 19:14:45 Can we just not have a carrier logo specific API inside SIM interface ;) Jul 27 19:14:59 I would hate if the UI code has to jump between interfaces. Jul 27 19:15:19 Carrier logo icon id will get exposed on netreg / network operator Jul 27 19:15:40 Then GetIcon() will be a generic function to be used by homescreen / stk Jul 27 19:15:51 I understand that. Jul 27 19:16:00 I am just coming from API usage point of view. Jul 27 19:16:25 The ideal way is to ship the icon via D-Bus, then we don't have this problem Jul 27 19:16:30 But you nixed that idea ;) Jul 27 19:16:44 I know. However for one carrier logo that might be acceptable. Jul 27 19:16:50 Just for STK case it was too much. Jul 27 19:17:01 How many carrier logos do we expect on the SIM card. Jul 27 19:17:19 Primary + up to 255 secondaries Jul 27 19:17:44 However, they're only really exposed through NetworkOperator, so only a handful active at a time Jul 27 19:17:44 Yeah ... Jul 27 19:18:16 So in theory we could keep GetIcon on STK interface. And just expose the operator logo in binary. Jul 27 19:18:47 Assume we have one for the current operator and the 4 for the other ones in your country. Never saw a country with more than 5 operators. Jul 27 19:19:06 Honestly i don't see the point Jul 27 19:19:49 You're not really saving much here for the application Jul 27 19:19:59 Depends on the D-Bus bindings ;) Jul 27 19:20:12 Some of them are utterly fucked. Like dbus-glib. Jul 27 19:20:58 Still, even homescreen will need to pay attention to the Sim interface Jul 27 19:21:04 For the Inserted status Jul 27 19:21:12 Anyhow, that is a detail we can figure out once we have this working. Lets postpone this for a bit. Jul 27 19:29:25 jprvita: sorry, was out -- the smsdbus branch should be forgotten -- quite a mess to delete it on gitorious, can't figure it out Jul 27 19:29:46 jprvita: I'll check on the test_fatal_log thingie, thanks for the catch Jul 27 19:30:28 inakypg: git push :smsdbus Jul 27 19:30:39 this should delete your remote branch Jul 27 19:31:13 inakypg: use bootstrap-configure, it's really handy Jul 27 19:32:03 -gboolean test_fatal_log(const gchar *log_domain, Jul 27 19:32:03 +static gboolean test_fatal_log(const gchar *log_domain, Jul 27 19:32:42 inakypg: since you're not exporting this function, this should suppress the warning Jul 27 19:33:10 but for the other problems, I guess there are some stuff missing from sms.h Jul 27 19:40:38 jprvita: verifying: this is in the master branch, right? Jul 27 19:41:04 inakypg: yes Jul 27 19:48:57 jprvita: wonder how did I miss the warning on non-declared sms_msg_send(), wth? Jul 27 19:49:10 now solving that is less than trivial...run into #include hell Jul 27 19:50:16 bootstap-configure enables maintainer-mode, which in turn enable extra warnings Jul 27 19:50:38 I don't get any warning when compiling your master branch without maintainer-mode Jul 27 19:51:27 inakypg: and yes, that's #include hell.. that's why I've stopped to try to fix it ;) Jul 27 20:03:50 denkenz: I'm trying to test SMS patches from inakypg but I might have faced some sort of regression for huawei E220 Jul 27 20:04:10 on ofono 0.16 I used to have org.ofono.SmsManager org.ofono.NetworkRegistration org.ofono.VoiceCallManager org.ofono.SimManager for this modem Jul 27 20:04:21 and now I have only SimManager Jul 27 20:04:36 Is your modem pin locked? Jul 27 20:04:53 no idea, how can I check this out? Jul 27 20:05:01 I know it's operator-locked Jul 27 20:05:06 is this what you mean? Jul 27 20:05:09 What does AT+CPIN? return Jul 27 20:05:26 let me enable at debug Jul 27 20:05:41 I think kvalo's SIMST magic doesn't cover PIN locked modems Jul 27 20:11:15 ofonod[14083]: > AT+CPIN?\r Jul 27 20:11:15 ofonod[14083]: < \r\n+CPIN: READY\r\n\r\nOK\r\n Jul 27 20:11:15 ofonod[14083]: at_cpin_cb got result: 1 Jul 27 20:11:15 (note: this is with 0.16, btw) Jul 27 20:11:46 Paste your at debug with git on pastebin Jul 27 20:12:22 ok Jul 27 20:17:28 denkenz: one other question. ofono_sim_read can only read entire files. Is there a more appopriate api to read len bytes from fileid at a specified offset? Or is it possible to issue a command to the sim to read only part of a file? Jul 27 20:17:28 denkenz: http://pastebin.ca/1909586 Jul 27 20:17:52 (it's actually printing more BOOT and RSSI messages very slowly) Jul 27 20:18:45 kristenc: I suggest you extend the sim queue to handle images Jul 27 20:19:09 kristenc: We want to serialize our calls to the driver Jul 27 20:20:14 That part can then take care of reading the clut & the like Jul 27 20:42:57 jprivta: sounds like your modem never sends a SIMST Jul 27 20:43:53 It also reports 'USIM is invalid in case of PS' Jul 27 20:44:56 denkenz: is there someway to fix or workaround this issue? Jul 27 20:46:10 ofonod[20614]: Pcui:< \r\n^SYSINFO:0,1,0,0,3,0,0\r\n\r\nOK\r\n Jul 27 20:46:29 You can try doing a g_timeout and re-running the SYSINFO query Jul 27 20:46:36 If that 3 turns into a 1 then you're fine Jul 27 20:47:01 The other alternative is to simply force the inserted state inside plugins/huawei.c Jul 27 20:50:16 so I can play with g_at_chat_send(data->pcui, "AT^SYSINFO", sysinfo_prefix, sysinfo_cb, modem, NULL) and notify_sim_state(), right? Jul 27 20:50:28 yeah Jul 27 20:51:01 seem very easy to test, tomorrow I'll let you know the results Jul 27 21:00:23 denkenz: by sim queue you mean the simop_q ? It seems that is only exposed through sim_read/sim_write. Correct? Jul 27 21:00:42 kristenc: Yep, but we can change that Jul 27 21:00:54 denkenz: won't that lead to concurrency issues? Jul 27 21:01:02 err? Jul 27 21:01:16 multiple ways to push onto the same queue? Jul 27 21:01:27 We're not threaded, so no Jul 27 21:01:42 oh - but if we are only single threaded that doesn't matter... Jul 27 21:02:28 ok. Jul 27 21:15:45 out of curiosity, why not use sim_read? Jul 27 21:22:28 There are two problems Jul 27 21:22:40 sim_read doesn't handle files > 256 bytes Jul 27 21:22:58 And we don't actually want to read all of EFiidf Jul 27 21:23:25 We only want to read and cache the portions that are relevant Jul 27 21:24:38 e.g. EFiidf of 65K might have 2 images in the beginning and a C-LUT at the end Jul 27 21:24:56 Reading all 65K (256 read operations) to the SIM is wasteful, when maybe 10 would do Jul 27 21:25:56 denkenz: oh good point Jul 27 21:27:19 it should handle > 256-byte files if the driver supports it Jul 27 21:28:47 We don't, because we don't utilize offset properly Jul 27 21:29:11 We always use offset of 0 and don't actually check that length <= 256 Jul 27 21:29:35 denkenz: ah yeah, now i remember, sorry Jul 27 21:29:56 Up to now it just hasn't been a problem, nothing except EFiidf is more than 256 bytes ;) Jul 27 21:53:25 holtmann: You should be happy now, your long asked for feature is in Jul 27 22:25:31 denkenz: Sweet :) Jul 27 22:33:58 zhenhua: Can you run potential btio.[ch] changes by #bluez or linux-bluetooth@vger.kernel.org first. I would require that Johan or Luiz are signing off on these as well. Jul 27 23:35:18 kristenc: Did you send that patch just twice or is it a different version? If it is a different version please do something like [PATCH v2]. Jul 27 23:35:49 Or is my mailserver being stupid again and not filtering duplicates. That could be also posssible :( Jul 27 23:35:51 holtmann: it's a different version. I'll do that next time, sorry Jul 27 23:36:08 ignore the first version, it had a bug Jul 27 23:36:16 No problem. Just helps us to ignore the previous version. Jul 28 00:06:17 * balrog-k1n will soon be doing [PATCH v75] sending stk patches ;) Jul 28 00:14:11 holtmann: not quite catch you. btio.[ch] is a subset of bluez's btio.[ch]. how to run them within bluez? Jul 28 00:15:13 holtmann: the 5 patches are for oFono. i doubt they might be confused how to review the patches. Jul 28 00:18:20 balrog-k1n: You just need denkenz mind reader device ;) Jul 28 00:28:30 denkenz: any comments for dun patches? Jul 28 00:51:27 zhenhua: You need to get the btio stuff through holtmann first Jul 28 00:52:31 N900 support still on vacation? Jul 28 00:55:23 i see. Jul 28 01:02:13 denkenz: i assume the string_and_int type needs to be added in g_dbus, right? Jul 28 01:02:30 gdbus, not g_dbus Jul 28 01:04:35 ah, not right Jul 28 01:05:11 ok, ignore me, i found the right header Jul 28 01:05:19 balrog-k1n: just src/dbus.c Jul 28 01:05:33 yes Jul 28 01:06:24 denkenz: i'm not sure between include/dbus.h and src/ofono.h though Jul 28 01:06:54 for the struct ofono_string_and_int (or similar) declaration Jul 28 01:07:27 balrog-k1n: Stick it inside ofono.h and dbus.c for now with __ofono prefix Jul 28 01:09:19 Maybe name it like __ofono_dbus_append_menu_item() Jul 28 01:10:00 wait, "items" in plural, right? Jul 28 01:10:11 since it needs to append the entire list Jul 28 01:10:32 items is fine too Jul 28 01:10:59 Probably makes more sense, you're right Jul 28 01:11:01 ok, just wasn't sure if we meant the same thing Jul 28 01:16:17 And if you can make it use basic types that'd be nice Jul 28 01:16:36 e.g. like const char **items, unsigned char *icons Jul 28 01:17:17 i thought we wanted an array of structs? Jul 28 01:19:05 i'm not sure if you're going to like it though :) Jul 28 01:19:40 there need to be three functions, __ofono_dbus_message_iter_append_menu_items for messages, __ofono_dbus_dict_append_menu_items for property dicts and __ofono_dbus_signal_menu_items_property_changed for properties Jul 28 01:24:27 array of structs means we have to define the struct somewhere common Jul 28 01:24:35 Bit hesitant to do it inside ofono.h Jul 28 01:25:46 I see two choices here: basic types + implementation in dbus.c Jul 28 01:25:47 i have struct __ofono_string_and_byte in ofono.h together with the new functions, seems lesser evil than taking two array parameters :) Jul 28 01:26:09 lol Jul 28 01:26:35 disclaimer: I'm still totally waffling this myself, I hate every solution I thought of so far Jul 28 01:27:17 yeah Jul 28 01:29:07 So I'm actually fine with something like struct stk_menu { char **items; byte *icons; } Jul 28 01:29:21 And then having __ofono functions take char **items and byte *icons Jul 28 01:30:04 Seems lesser of all evils so far Jul 28 01:31:20 how about stk_menu_item instead of string_and_byte then? Jul 28 01:31:51 and the __ofono functions take a single array Jul 28 01:32:10 as in __ofono_foo(stk_menu_item *items)? Jul 28 01:32:21 right Jul 28 01:32:36 So again, my problem there is the struct has to be defined somewhere Jul 28 01:32:44 Putting it into ofono.h seems really ugly Jul 28 01:32:57 but you're already putting the functions there Jul 28 01:33:37 Yeah, which is why I'd like basic types, it just feels cleaner Jul 28 01:33:40 another possibility is it could be a special case in ofono_dbus_dict_append_array Jul 28 01:34:35 using a fake dbus type constant Jul 28 01:35:09 Heh, I could be convinced of that one, but feels too evil Jul 28 01:36:16 All actuality the char ** is actually not bad Jul 28 01:36:27 it leads to g_strfreev() and quite easy to fill in Jul 28 01:37:08 Instead of messing with custom structs and struct destructors Jul 28 01:37:37 actually are you sure we want all three functions, instead of just append_menu_items_variant? Jul 28 01:39:57 Lets see, we need the variant version for stk.c Jul 28 01:40:04 and we need the regular version for stkagent.c Jul 28 01:40:39 the variant version can use the regular version Jul 28 01:41:16 So maybe the regular version inside ofono.h and the other 3 static inside stk/stkagent Jul 28 01:41:28 s/ofono.h/ofono.h & dbus.c Jul 28 01:43:13 In reality we're talking about a 6 line function Jul 28 01:43:31 If you want to just forget all this and duplicate the code, I'm fine with that too Jul 28 01:44:15 ok i'll let you decide :) Jul 28 01:44:23 the more ideas the more difficult to decide Jul 28 01:45:01 Ok, tell me what you want the struct to look like? Are you still partial to item being 1 struct? Jul 28 01:45:30 that would be the cleaner way to me Jul 28 01:48:25 Ok, then do that and duplicate the marshaller Jul 28 01:49:54 Feel free to send the struct declarations, marshallers and basic MenuItem property implementation for review first Jul 28 01:50:02 Even if it doesn't work / is empty Jul 28 01:51:02 so the structs would be declared in stkagent.c, and the variant version of the marshaller in stk.c and regular in stkagent.c? Jul 28 01:51:21 err Jul 28 01:51:27 struct in stkagent.h i mean Jul 28 01:52:19 you can declare the struct and the _from functions in stkutil.[ch] too Jul 28 01:52:39 e.g. to convert select item / setup menu into the simplified struct Jul 28 01:52:51 And have that one call the text_to_html converter, etc Jul 28 01:53:23 Then the marshallers as you described it Jul 28 01:54:15 i was thinking stk.c should call the text_to_html converter because using html is a property of our dbus interface Jul 28 01:55:51 how about we go back to your idea of the three marshallers defined in ofono.h and dbus.c, taking two separate arrays? :) Jul 28 01:56:33 rofl Jul 28 01:57:10 See how hard this is? :) Jul 28 01:58:10 well, i'll leave it for tomorrow and send something for review Jul 28 01:58:21 I'm fine with it, question is who calls text_to_html? Jul 28 01:58:30 You still need a utility function to do that Jul 28 01:59:06 so maybe let's define all the structs and marshallers in stkagent.[ch] Jul 28 01:59:12 and expose for stk.c to use Jul 28 01:59:38 Okay, do that Jul 28 02:01:03 If I change my mind I just move it around Jul 28 02:01:09 Lets get this stuff merged Jul 28 02:01:12 ok Jul 28 02:02:03 Go to sleep ;) Jul 28 02:03:07 good point :) **** ENDING LOGGING AT Wed Jul 28 02:59:56 2010