diff options
author | L. Sorin <sorin@axis.com> | 2014-06-12 16:59:46 +0200 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2014-10-26 21:04:02 +0000 |
commit | 09f0b037629a3e59d9e63c7083f59df9d9fd9db5 (patch) | |
tree | 281e20d7c118d81868cebe859c2d3749b1dea576 /ext/curl | |
parent | 62e28d228770a4c2905214e2b442e1a4559d0604 (diff) |
curlsshsink: use the locally defined types
Just a matter of coding style, makes the code a bit tidier...
https://bugzilla.gnome.org/show_bug.cgi?id=731581
Diffstat (limited to 'ext/curl')
-rw-r--r-- | ext/curl/gstcurlsshsink.c | 8 | ||||
-rw-r--r-- | ext/curl/gstcurlsshsink.h | 12 |
2 files changed, 11 insertions, 9 deletions
diff --git a/ext/curl/gstcurlsshsink.c b/ext/curl/gstcurlsshsink.c index 095941320..d2dac8d89 100644 --- a/ext/curl/gstcurlsshsink.c +++ b/ext/curl/gstcurlsshsink.c @@ -179,7 +179,7 @@ gst_curl_ssh_sink_class_init (GstCurlSshSinkClass * klass) static void gst_curl_ssh_sink_init (GstCurlSshSink * sink) { - sink->ssh_auth_type = CURLSSH_AUTH_NONE; + sink->ssh_auth_type = GST_CURLSSH_AUTH_NONE; sink->ssh_pub_keyfile = NULL; sink->ssh_priv_keyfile = NULL; sink->ssh_key_passphrase = NULL; @@ -373,8 +373,8 @@ gst_curl_ssh_sink_set_options_unlocked (GstCurlBaseSink * bcsink) /* make sure we only accept PASSWORD or PUBLICKEY auth methods * (can be extended later) */ - if (sink->ssh_auth_type == CURLSSH_AUTH_PASSWORD || - sink->ssh_auth_type == CURLSSH_AUTH_PUBLICKEY) { + if (sink->ssh_auth_type == GST_CURLSSH_AUTH_PASSWORD || + sink->ssh_auth_type == GST_CURLSSH_AUTH_PUBLICKEY) { /* set the SSH_AUTH_TYPE */ if ((curl_err = curl_easy_setopt (bcsink->curl, CURLOPT_SSH_AUTH_TYPES, @@ -385,7 +385,7 @@ gst_curl_ssh_sink_set_options_unlocked (GstCurlBaseSink * bcsink) } /* if key authentication -> provide the private key passphrase as well */ - if (sink->ssh_auth_type == CURLSSH_AUTH_PUBLICKEY) { + if (sink->ssh_auth_type == GST_CURLSSH_AUTH_PUBLICKEY) { if (sink->ssh_key_passphrase) { if ((curl_err = curl_easy_setopt (bcsink->curl, CURLOPT_KEYPASSWD, sink->ssh_key_passphrase)) != CURLE_OK) { diff --git a/ext/curl/gstcurlsshsink.h b/ext/curl/gstcurlsshsink.h index 1b56c4d5e..376f1b1b2 100644 --- a/ext/curl/gstcurlsshsink.h +++ b/ext/curl/gstcurlsshsink.h @@ -38,9 +38,10 @@ G_BEGIN_DECLS (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_CURL_SSH_SINK)) #define GST_IS_CURL_SSH_SINK_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_CURL_SSH_SINK)) -/* see <curl/curl.h> */ - typedef enum + +typedef enum { + /* Keep these in sync with the libcurl definitions. See <curl/curl.h> */ GST_CURLSSH_AUTH_NONE = CURLSSH_AUTH_NONE, GST_CURLSSH_AUTH_PUBLICKEY = CURLSSH_AUTH_PUBLICKEY, GST_CURLSSH_AUTH_PASSWORD = CURLSSH_AUTH_PASSWORD @@ -55,9 +56,10 @@ struct _GstCurlSshSink GstCurlBaseSink parent; /*< private > */ - guint ssh_auth_type; /* for now, supporting only: - CURLSSH_AUTH_PASSWORD (passwd auth) OR - CURLSSH_AUTH_PUBLICKEY (pub/pvt key auth) */ + /* for now, supporting only: + * GST_CURLSSH_AUTH_PASSWORD (password authentication) and + * GST_CURLSSH_AUTH_PUBLICKEY (public key authentication) */ + GstCurlSshAuthType ssh_auth_type; gchar *ssh_pub_keyfile; /* filename for the public key: CURLOPT_SSH_PUBLIC_KEYFILE */ |