1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
|
/* shotwell-plugin-common.vapi generated by valac 0.34.7, do not modify. */
namespace Publishing {
namespace RESTSupport {
[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 Publishing.RESTSupport.Argument[] sort (Publishing.RESTSupport.Argument[] inputArray);
public string to_string ();
}
[CCode (cheader_filename = "shotwell-plugin-common.h")]
public abstract class BatchUploader {
public BatchUploader (Publishing.RESTSupport.Session session, Spit.Publishing.Publishable[] publishables);
protected abstract Publishing.RESTSupport.Transaction create_transaction (Spit.Publishing.Publishable publishable);
protected Spit.Publishing.Publishable get_current_publishable ();
protected Publishing.RESTSupport.Session get_session ();
public void upload (Spit.Publishing.ProgressCallback? status_updated = null);
public signal void upload_complete (int num_photos_published);
public signal void upload_error (Spit.Publishing.PublishingError err);
}
[CCode (cheader_filename = "shotwell-plugin-common.h")]
public abstract class GooglePublisher : GLib.Object, Spit.Publishing.Publisher {
public class AuthenticatedTransaction : Publishing.RESTSupport.Transaction {
public AuthenticatedTransaction (Publishing.RESTSupport.GoogleSession session, string endpoint_url, Publishing.RESTSupport.HttpMethod method);
}
protected GooglePublisher (Spit.Publishing.Service service, Spit.Publishing.PluginHost host, string scope);
protected abstract void do_logout ();
protected abstract Spit.Publishing.Authenticator get_authenticator ();
protected unowned Spit.Publishing.PluginHost get_host ();
protected Publishing.RESTSupport.GoogleSession get_session ();
public abstract bool is_running ();
protected abstract void on_login_flow_complete ();
public abstract void start ();
public abstract void stop ();
}
[CCode (cheader_filename = "shotwell-plugin-common.h")]
public abstract class GoogleSession : Publishing.RESTSupport.Session {
public GoogleSession ();
public abstract void deauthenticate ();
public abstract string get_access_token ();
public abstract string get_user_name ();
}
[CCode (cheader_filename = "shotwell-plugin-common.h")]
public abstract class Session {
public Session (string? endpoint_url = null);
public bool are_transactions_stopped ();
public string? get_endpoint_url ();
public abstract bool is_authenticated ();
protected void notify_authenticated ();
protected void notify_authentication_failed (Spit.Publishing.PublishingError err);
protected void notify_wire_message_unqueued (Soup.Message message);
public void send_wire_message (Soup.Message message);
public void set_insecure ();
public void stop_transactions ();
public signal void authenticated ();
public signal void authentication_failed (Spit.Publishing.PublishingError err);
public signal void wire_message_unqueued (Soup.Message message);
}
[CCode (cheader_filename = "shotwell-plugin-common.h")]
public class Transaction {
public Transaction (Publishing.RESTSupport.Session parent_session, Publishing.RESTSupport.HttpMethod method = HttpMethod.POST);
public void add_argument (string name, string value);
protected virtual void add_header (string key, string value);
protected void check_response (Soup.Message message) throws Spit.Publishing.PublishingError;
public string detailed_error_from_tls_flags (out GLib.TlsCertificate cert);
public virtual void execute () throws Spit.Publishing.PublishingError;
public Publishing.RESTSupport.Argument[] get_arguments ();
public string? get_endpoint_url ();
public bool get_is_executed ();
public Soup.Message get_message ();
public Publishing.RESTSupport.HttpMethod get_method ();
public Publishing.RESTSupport.Session get_parent_session ();
public string get_response ();
public unowned Soup.MessageHeaders get_response_headers ();
public Publishing.RESTSupport.Argument[] get_sorted_arguments ();
public uint get_status_code ();
protected void send () throws Spit.Publishing.PublishingError;
protected void set_custom_payload (string? custom_payload, string payload_content_type, ulong payload_length = 0);
protected void set_is_executed (bool is_executed);
protected void set_message (Soup.Message message);
public Transaction.with_endpoint_url (Publishing.RESTSupport.Session parent_session, string endpoint_url, Publishing.RESTSupport.HttpMethod method = HttpMethod.POST);
public signal void chunk_transmitted (int bytes_written_so_far, int total_bytes);
public signal void completed ();
public signal void network_error (Spit.Publishing.PublishingError err);
}
[CCode (cheader_filename = "shotwell-plugin-common.h")]
public class UploadTransaction : Publishing.RESTSupport.Transaction {
protected GLib.HashTable<string,string> binary_disposition_table;
protected Gee.HashMap<string,string> message_headers;
protected string mime_type;
protected Spit.Publishing.Publishable publishable;
public UploadTransaction (Publishing.RESTSupport.Session session, Spit.Publishing.Publishable publishable);
protected override void add_header (string key, string value);
public override void execute () throws Spit.Publishing.PublishingError;
protected void set_binary_disposition_table (GLib.HashTable<string,string> new_disp_table);
public UploadTransaction.with_endpoint_url (Publishing.RESTSupport.Session session, Spit.Publishing.Publishable publishable, string endpoint_url);
}
[CCode (cheader_filename = "shotwell-plugin-common.h")]
public class XmlDocument {
public delegate string? CheckForErrorResponse (Publishing.RESTSupport.XmlDocument doc);
public Xml.Node* get_named_child (Xml.Node* parent, string child_name) throws Spit.Publishing.PublishingError;
public string get_property_value (Xml.Node* node, string property_key) throws Spit.Publishing.PublishingError;
public Xml.Node* get_root_node ();
public static Publishing.RESTSupport.XmlDocument parse_string (string? input_string, Publishing.RESTSupport.XmlDocument.CheckForErrorResponse check_for_error_response) throws Spit.Publishing.PublishingError;
}
[CCode (cheader_filename = "shotwell-plugin-common.h")]
public enum HttpMethod {
GET,
POST,
PUT;
public string to_string ();
public static Publishing.RESTSupport.HttpMethod from_string (string str);
}
[CCode (cheader_filename = "shotwell-plugin-common.h")]
public static string asciify_string (string s);
[CCode (cheader_filename = "shotwell-plugin-common.h")]
public static string decimal_entity_encode (string source);
[CCode (cheader_filename = "shotwell-plugin-common.h")]
public static string hmac_sha1 (string key, string message);
}
}
namespace Resources {
[CCode (cheader_filename = "shotwell-plugin-common.h")]
public const string LICENSE;
[CCode (cheader_filename = "shotwell-plugin-common.h", cname = "PLUGIN_RESOURCE_PATH")]
public const string RESOURCE_PATH;
[CCode (cheader_filename = "shotwell-plugin-common.h")]
public const string TRANSLATORS;
[CCode (cheader_filename = "shotwell-plugin-common.h")]
public const string WEBSITE_NAME;
[CCode (cheader_filename = "shotwell-plugin-common.h")]
public const string WEBSITE_URL;
[CCode (cheader_filename = "shotwell-plugin-common.h")]
public static Gdk.Pixbuf[]? load_from_resource (string resource_path);
[CCode (cheader_filename = "shotwell-plugin-common.h")]
public static Gdk.Pixbuf[]? load_icon_set (GLib.File? icon_file);
}
namespace Shotwell {
namespace Plugins {
namespace Common {
[CCode (cheader_filename = "shotwell-plugin-common.h")]
public abstract class BuilderPane : Spit.Publishing.DialogPane, GLib.Object {
public BuilderPane ();
public override void constructed ();
public Gtk.Builder get_builder ();
public virtual Gtk.Widget get_default_widget ();
public virtual void on_pane_installed ();
public virtual void on_pane_uninstalled ();
public bool connect_signals { get; construct; }
public string default_id { owned get; construct; }
public Spit.Publishing.DialogPane.GeometryOptions preferred_geometry { get; construct; }
public string resource_path { owned get; construct; }
}
[CCode (cheader_filename = "shotwell-plugin-common.h")]
public abstract class WebAuthenticationPane : Spit.Publishing.DialogPane, GLib.Object {
public WebAuthenticationPane ();
public override void constructed ();
public WebKit.WebView get_view ();
public abstract void on_page_load ();
protected void set_cursor (Gdk.CursorType type);
public string login_uri { owned get; construct; }
public Spit.Publishing.DialogPane.GeometryOptions preferred_geometry { get; construct; }
}
}
}
}
|