Re: [PATCH v2 3/5] NMSettingProxy added to libnm-core



On Tue, 2016-07-12 at 17:57 +0530, Atul Anand wrote:
libnm-core has been expanded to include proxy settings which clients
like nm-connection-editor use to configure proxy in PacRunner. It
offers three modes i.e 'none', 'auto' and 'manual' and according take
data to configure PacRunner. The modes matches on the PacRunner side
too.


@@ -751,6 +756,14 @@ _normalize_ip_config (NMConnection *self,
GHashTable *parameters)
               * to fail. But if no IP4 setting was specified,
assume the caller was just
               * being lazy.
               */
+             if (!s_proxy) {
+                     setting = nm_setting_proxy_new ();
+
+                     g_object_set (setting,
+                                   NM_SETTING_PROXY_METHOD,
NM_SETTING_PROXY_METHOD_NONE,
+                                   NULL);
+                     nm_connection_add_setting (self, setting);
+             }

I'm not sure if it makes sense to create proxy settings here. Do they
always need to be present?

If yes, please adjust the tests and the comment.

--- a/libnm/libnm.ver
+++ b/libnm/libnm.ver
@@ -1066,6 +1066,23 @@ libnm_1_2_4 {
 libnm_1_4_0 {
 global:
      nm_device_team_get_config;
+     nm_connection_get_setting_proxy;
+     nm_setting_proxy_get_type;
+     nm_setting_proxy_new;
+     nm_setting_proxy_get_method;
+     nm_setting_proxy_get_http_proxy;
+     nm_setting_proxy_get_http_port;
+     nm_setting_proxy_get_http_default;
+     nm_setting_proxy_get_ssl_proxy;
+     nm_setting_proxy_get_ssl_port;
+     nm_setting_proxy_get_ftp_proxy;
+     nm_setting_proxy_get_ftp_port;
+     nm_setting_proxy_get_socks_proxy;
+     nm_setting_proxy_get_socks_port;
+     nm_setting_proxy_get_socks_version_5;
+     nm_setting_proxy_get_pac_script;
+     nm_setting_proxy_get_no_proxy_for;
+     nm_setting_proxy_get_pac_url;
      nm_setting_connection_get_stable_id;
      nm_setting_ip6_config_get_token;
      nm_setting_ip_config_get_dns_priority;

Please also add nm_setting_proxy_method_get_type(); mkenums creates the
glib type for the NMSettingProxyMethod typedef and it's needed at least
to generate the introspection data.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]