Exemplo n.º 1
0
        static CFProxySettings()
        {
            IntPtr handle = CFObject.dlopen(CFNetwork.CFNetworkLibrary, 0);

            kCFNetworkProxiesHTTPEnable                = CFObject.GetCFObjectHandle(handle, "kCFNetworkProxiesHTTPEnable");
            kCFNetworkProxiesHTTPPort                  = CFObject.GetCFObjectHandle(handle, "kCFNetworkProxiesHTTPPort");
            kCFNetworkProxiesHTTPProxy                 = CFObject.GetCFObjectHandle(handle, "kCFNetworkProxiesHTTPProxy");
            kCFNetworkProxiesProxyAutoConfigEnable     = CFObject.GetCFObjectHandle(handle, "kCFNetworkProxiesProxyAutoConfigEnable");
            kCFNetworkProxiesProxyAutoConfigJavaScript = CFObject.GetCFObjectHandle(handle, "kCFNetworkProxiesProxyAutoConfigJavaScript");
            kCFNetworkProxiesProxyAutoConfigURLString  = CFObject.GetCFObjectHandle(handle, "kCFNetworkProxiesProxyAutoConfigURLString");

            CFObject.dlclose(handle);
        }
Exemplo n.º 2
0
        static CFBoolean()
        {
            var handle = CFObject.dlopen(CFObject.CoreFoundationLibrary, 0);

            if (handle == IntPtr.Zero)
            {
                return;
            }
            try {
                True  = new CFBoolean(CFObject.GetCFObjectHandle(handle, "kCFBooleanTrue"), false);
                False = new CFBoolean(CFObject.GetCFObjectHandle(handle, "kCFBooleanFalse"), false);
            }
            finally {
                CFObject.dlclose(handle);
            }
        }
Exemplo n.º 3
0
        static CFProxy()
        {
            IntPtr handle = CFObject.dlopen(CFNetwork.CFNetworkLibrary, 0);

            //kCFProxyAutoConfigurationHTTPResponseKey = CFObject.GetCFObjectHandle (handle, "kCFProxyAutoConfigurationHTTPResponseKey");
            kCFProxyAutoConfigurationJavaScriptKey = CFObject.GetCFObjectHandle(handle, "kCFProxyAutoConfigurationJavaScriptKey");
            kCFProxyAutoConfigurationURLKey        = CFObject.GetCFObjectHandle(handle, "kCFProxyAutoConfigurationURLKey");
            kCFProxyHostNameKey   = CFObject.GetCFObjectHandle(handle, "kCFProxyHostNameKey");
            kCFProxyPasswordKey   = CFObject.GetCFObjectHandle(handle, "kCFProxyPasswordKey");
            kCFProxyPortNumberKey = CFObject.GetCFObjectHandle(handle, "kCFProxyPortNumberKey");
            kCFProxyTypeKey       = CFObject.GetCFObjectHandle(handle, "kCFProxyTypeKey");
            kCFProxyUsernameKey   = CFObject.GetCFObjectHandle(handle, "kCFProxyUsernameKey");

            //kCFProxyTypeNone = CFObject.GetCFObjectHandle (handle, "kCFProxyTypeNone");
            kCFProxyTypeAutoConfigurationURL        = CFObject.GetCFObjectHandle(handle, "kCFProxyTypeAutoConfigurationURL");
            kCFProxyTypeAutoConfigurationJavaScript = CFObject.GetCFObjectHandle(handle, "kCFProxyTypeAutoConfigurationJavaScript");
            kCFProxyTypeFTP   = CFObject.GetCFObjectHandle(handle, "kCFProxyTypeFTP");
            kCFProxyTypeHTTP  = CFObject.GetCFObjectHandle(handle, "kCFProxyTypeHTTP");
            kCFProxyTypeHTTPS = CFObject.GetCFObjectHandle(handle, "kCFProxyTypeHTTPS");
            kCFProxyTypeSOCKS = CFObject.GetCFObjectHandle(handle, "kCFProxyTypeSOCKS");

            CFObject.dlclose(handle);
        }