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;
/* 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,
}
/* 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) {
(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
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 */