-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Dan Williams schrieb: > We could push those through as an array of strings, but that adds > parsing complexity to NM. Ideally we could pass them through as a dict > entry of array of struct (uint32, uint32), but that gets complicated to > add to the dbus helpers. This is one that needs more thought. Yeah, that's why I'm asking here :-) Extending the API to allow an array of struct would be best design-wise, but I agree with you that a flexible API (that does not only allow "r(ss)" but any "r(...)") would be too complicated for nm-utils as a wrapper. But as an alternative we could provide an API to allow low-level access to a container. This way, we would have something like nmu_dbus_dict_container_add() or the like and get the sub-iterator in which the client can put everything he wants. > So your suggestion of adding support to the dbus dict helpers for adding > an array of uint32s is probably a good one. There already are helper > functions for adding byte and string arrays, doing one for uint32 > shouldn't be too much work; maybe I'll add that this weekend. That wouldn't solve the problem for the ip/netmask struct of the route, unless we'd use two arrays of uint32, one for all the ips and one for all the netmasks, just as vpnc does with its environment variables. Not a nice solution for me. Ideally, we'd convert all the duplicate dict entries that currently are in the code to arrays of appropriate basic types, which should be easy, as there are no structs used, yet. However, what should we do with structs? I can't think of any sensible API to flexibly add arbitrary structs to the dict, not to mention an array of them. But that may also due to the fact that I'm only thinking about it when I'm already tired and want to go to bed :-) Let me know if you want to do the changes to use arrays rather than duplicate dict entries. If you won't do, I'll do, shouldn't be too much work and should be done before doing anything that has to do something with the structs. Regards, Thomas -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFSRvSxVmZpTAq4IgRAl5FAJ4o25Qc/WTiUFlgGQug12BjY75+nACcDiRm HfmlbY7/UEadApmTk14uXQI= =LtmQ -----END PGP SIGNATURE----- _______________________________________________ NetworkManager-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/networkmanager-list
