summaryrefslogtreecommitdiff
path: root/plugins/shotwell-plugin-common.vapi
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/shotwell-plugin-common.vapi')
-rw-r--r--plugins/shotwell-plugin-common.vapi38
1 files changed, 37 insertions, 1 deletions
diff --git a/plugins/shotwell-plugin-common.vapi b/plugins/shotwell-plugin-common.vapi
index 9fc93eb..f07c2c7 100644
--- a/plugins/shotwell-plugin-common.vapi
+++ b/plugins/shotwell-plugin-common.vapi
@@ -2,14 +2,50 @@
namespace Publishing {
namespace RESTSupport {
+ namespace OAuth1 {
+ [CCode (cheader_filename = "shotwell-plugin-common.h")]
+ public class Session : Publishing.RESTSupport.Session {
+ public Session (string? endpoint_uri = null);
+ public void authenticate_from_persistent_credentials (string token, string secret, string username);
+ public void deauthenticate ();
+ public string get_access_phase_token ();
+ public string get_access_phase_token_secret ();
+ public string get_consumer_key ();
+ public string get_oauth_nonce ();
+ public string get_oauth_timestamp ();
+ public string get_request_phase_token ();
+ public string get_username ();
+ public bool has_access_phase_token ();
+ public override bool is_authenticated ();
+ public void set_access_phase_credentials (string token, string secret, string username);
+ public void set_api_credentials (string consumer_key, string consumer_secret);
+ public void set_request_phase_credentials (string token, string secret);
+ public string sign_transaction (Publishing.RESTSupport.Transaction txn, Publishing.RESTSupport.Argument[]? extra_arguments = null);
+ }
+ [CCode (cheader_filename = "shotwell-plugin-common.h")]
+ public class Transaction : Publishing.RESTSupport.Transaction {
+ public Transaction (Publishing.RESTSupport.OAuth1.Session session, Publishing.RESTSupport.HttpMethod method = Publishing.RESTSupport.HttpMethod.POST);
+ public override void execute () throws Spit.Publishing.PublishingError;
+ public Transaction.with_uri (Publishing.RESTSupport.OAuth1.Session session, string uri, Publishing.RESTSupport.HttpMethod method = Publishing.RESTSupport.HttpMethod.POST);
+ }
+ [CCode (cheader_filename = "shotwell-plugin-common.h")]
+ public class UploadTransaction : Publishing.RESTSupport.UploadTransaction {
+ protected weak Publishing.RESTSupport.OAuth1.Session session;
+ public UploadTransaction (Publishing.RESTSupport.OAuth1.Session session, Spit.Publishing.Publishable publishable, string endpoint_uri);
+ public void add_authorization_header_field (string key, string value);
+ public void authorize ();
+ public string get_authorization_header_string ();
+ }
+ }
[CCode (cheader_filename = "shotwell-plugin-common.h")]
public class Argument {
public string key;
public string value;
public Argument (string key, string value);
public static int compare (Publishing.RESTSupport.Argument arg1, Publishing.RESTSupport.Argument arg2);
+ public static string serialize_list (Publishing.RESTSupport.Argument[] args, bool escape = false, string? separator = "&");
public static Publishing.RESTSupport.Argument[] sort (Publishing.RESTSupport.Argument[] inputArray);
- public string to_string ();
+ public string to_string (bool escape = false);
}
[CCode (cheader_filename = "shotwell-plugin-common.h")]
public abstract class BatchUploader {