Adding function __set_protocol_options
[python-purple] / libpurple / proxy.pxd
index faefbae..cbfdf2a 100644 (file)
 #
 
 cdef extern from "libpurple/proxy.h":
 #
 
 cdef extern from "libpurple/proxy.h":
-    cdef struct PurpleProxyInfo
+    ctypedef enum PurpleProxyType:
+        PURPLE_PROXY_USE_GLOBAL
+        PURPLE_PROXY_NONE
+        PURPLE_PROXY_HTTP
+        PURPLE_PROXY_SOCKS4
+        PURPLE_PROXY_SOCKS5
+        PURPLE_PROXY_USE_ENVVAR
 
 
-    ctypedef int PurpleProxyType
-    PurpleProxyInfo *purple_proxy_info_new()
-    void c_purple_proxy_info_set_type "purple_proxy_info_set_type" (PurpleProxyInfo *info, PurpleProxyType type)
-    void c_purple_proxy_info_set_host "purple_proxy_info_set_host" (const_char_ptr host)
-    void c_purple_proxy_info_set_port "purple_proxy_info_set_port" (const_char_ptr port)
+    ctypedef struct PurpleProxyInfo:
+        char *host
+        int   port
+        char *username
+        char *password
+
+    PurpleProxyInfo *c_purple_proxy_info_new "purple_proxy_info_new" ()
+    void c_purple_proxy_info_destroy "purple_proxy_info_destroy" \
+            (PurpleProxyInfo *info)
+    void c_purple_proxy_info_set_type "purple_proxy_info_set_type" \
+            (PurpleProxyInfo *info, PurpleProxyType type)
+    PurpleProxyType c_purple_proxy_info_get_type "purple_proxy_info_get_type" \
+            (PurpleProxyInfo *info)
+    void c_purple_proxy_info_set_host "purple_proxy_info_set_host" \
+            (PurpleProxyInfo *info, char *host)
+    void c_purple_proxy_info_set_port "purple_proxy_info_set_port" \
+            (PurpleProxyInfo *info, int port)
+    void c_purple_proxy_info_set_username "purple_proxy_info_set_username" \
+            (PurpleProxyInfo *info, char *username)
+    void c_purple_proxy_info_set_password "purple_proxy_info_set_password" \
+            (PurpleProxyInfo *info, char *password)