libpurple/purpleattachment.h

Thu, 21 Jul 2022 01:10:22 -0500

author
Gary Kramlich <grim@reaperworld.com>
date
Thu, 21 Jul 2022 01:10:22 -0500
changeset 41454
7cc69bde919d
parent 41207
d91e963b0a1c
child 41686
9bcd6ad114eb
permissions
-rw-r--r--

Update pidgin for the purple_account_manager_get_(in)active deprecations

Testing Done:
Compiled and made sure the menus still functioned as expected.

Reviewed at https://reviews.imfreedom.org/r/1536/

40526
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
1 /*
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
2 * purple
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
3 *
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
4 * Purple is the legal property of its developers, whose names are too numerous
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
5 * to list here. Please refer to the COPYRIGHT file distributed with this
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
6 * source distribution.
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
7 *
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
8 * This program is free software; you can redistribute it and/or modify
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
9 * it under the terms of the GNU General Public License as published by
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
10 * the Free Software Foundation; either version 2 of the License, or
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
11 * (at your option) any later version.
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
12 *
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
13 * This program is distributed in the hope that it will be useful,
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
16 * GNU General Public License for more details.
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
17 *
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
18 * You should have received a copy of the GNU General Public
40539
2941deda6d8d Use an https link to gnu.org in the license file headers
Gary Kramlich <grim@reaperworld.com>
parents: 40526
diff changeset
19 * License along with this library; if not, see <https://www.gnu.org/licenses/>.
40526
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
20 */
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
21
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
22 #if !defined(PURPLE_GLOBAL_HEADER_INSIDE) && !defined(PURPLE_COMPILATION)
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
23 # error "only <purple.h> may be included directly"
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
24 #endif
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
25
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
26 #ifndef PURPLE_ATTACHMENT_H
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
27 #define PURPLE_ATTACHMENT_H
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
28
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
29 #include <glib-object.h>
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
30
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
31 G_BEGIN_DECLS
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
32
41010
d0abbb616bea A bunch of random libpurple documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents: 40540
diff changeset
33 /**
d0abbb616bea A bunch of random libpurple documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents: 40540
diff changeset
34 * PURPLE_TYPE_ATTACHMENT:
d0abbb616bea A bunch of random libpurple documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents: 40540
diff changeset
35 *
d0abbb616bea A bunch of random libpurple documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents: 40540
diff changeset
36 * The standard _TYPE_ macro for #PurpleAttachment.
d0abbb616bea A bunch of random libpurple documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents: 40540
diff changeset
37 *
d0abbb616bea A bunch of random libpurple documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents: 40540
diff changeset
38 * Since: 3.0.0
d0abbb616bea A bunch of random libpurple documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents: 40540
diff changeset
39 */
d0abbb616bea A bunch of random libpurple documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents: 40540
diff changeset
40
40526
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
41 #define PURPLE_TYPE_ATTACHMENT purple_attachment_get_type()
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
42
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
43 /**
41207
d91e963b0a1c Remove unnecessary gtk-doc comments and move them where possible from libpurple/purple[a-n]*.h
Gary Kramlich <grim@reaperworld.com>
parents: 41010
diff changeset
44 * PurpleAttachment:
d91e963b0a1c Remove unnecessary gtk-doc comments and move them where possible from libpurple/purple[a-n]*.h
Gary Kramlich <grim@reaperworld.com>
parents: 41010
diff changeset
45 *
d91e963b0a1c Remove unnecessary gtk-doc comments and move them where possible from libpurple/purple[a-n]*.h
Gary Kramlich <grim@reaperworld.com>
parents: 41010
diff changeset
46 * #PurpleAttachment represents a file attached to a #PurpleMessage.
d91e963b0a1c Remove unnecessary gtk-doc comments and move them where possible from libpurple/purple[a-n]*.h
Gary Kramlich <grim@reaperworld.com>
parents: 41010
diff changeset
47 */
d91e963b0a1c Remove unnecessary gtk-doc comments and move them where possible from libpurple/purple[a-n]*.h
Gary Kramlich <grim@reaperworld.com>
parents: 41010
diff changeset
48
d91e963b0a1c Remove unnecessary gtk-doc comments and move them where possible from libpurple/purple[a-n]*.h
Gary Kramlich <grim@reaperworld.com>
parents: 41010
diff changeset
49 /**
40526
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
50 * purple_attachment_get_type:
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
51 *
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
52 * Returns: the #GType for an attachment.
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
53 *
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
54 * Since: 3.0.0
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
55 */
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
56 G_DECLARE_FINAL_TYPE(PurpleAttachment, purple_attachment, PURPLE, ATTACHMENT, GObject)
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
57
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
58 /**
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
59 * PurpleAttachmentForeachFunc:
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
60 * @attachment: The #PurpleAttachment instance.
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
61 * @data: User supplied data.
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
62 *
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
63 * Called when iterating #PurpleAttachment's.
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
64 *
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
65 * Since: 3.0.0
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
66 */
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
67 typedef void (*PurpleAttachmentForeachFunc)(PurpleAttachment *attachment, gpointer data);
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
68
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
69 /**
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
70 * purple_attachment_new:
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
71 * @id: The identifier of the attachment.
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
72 * @content_type: The mime-type of the content.
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
73 *
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
74 * Creates a new #PurpleAttachment with the given @id and @content_type.
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
75 *
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
76 * Since: 3.0.0
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
77 */
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
78 PurpleAttachment *purple_attachment_new(guint64 id, const gchar *content_type);
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
79
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
80 /**
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
81 * purple_attachment_get_id:
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
82 * @attachment: The #PurpleAttachment instance.
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
83 *
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
84 * Gets the ID from @attachment.
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
85 *
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
86 * Returns: The ID of @attachment.
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
87 *
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
88 * Since: 3.0.0
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
89 */
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
90 guint64 purple_attachment_get_id(PurpleAttachment *attachment);
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
91
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
92 /**
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
93 * purple_attachment_get_hash_key:
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
94 * @attachment: The #PurpleAttachment instance.
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
95 *
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
96 * Gets the hash key of @attachment. This should only be used when
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
97 * trying to address a #PurpleAttachment in a #GHashTable that is using
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
98 * g_int64_hash() as the key function.
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
99 *
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
100 * Returns: (transfer none): The hash key of @attachment.
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
101 *
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
102 * Since: 3.0.0
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
103 */
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
104 guint64 *purple_attachment_get_hash_key(PurpleAttachment *attachment);
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
105
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
106 /**
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
107 * purple_attachment_set_id:
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
108 * @attachment: The #PurpleAttachment instance.
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
109 * @id: The new ID for @attachment.
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
110 *
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
111 * Sets the ID of @attachment to @id.
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
112 *
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
113 * Since: 3.0.0
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
114 */
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
115 void purple_attachment_set_id(PurpleAttachment *attachment, guint64 id);
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
116
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
117 /**
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
118 * purple_attachment_get_content_type:
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
119 * @attachment: The #PurpleAttachment instance.
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
120 *
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
121 * Gets the content-type of @attachment.
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
122 *
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
123 * Returns: The content-type of @attachment.
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
124 *
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
125 * Since: 3.0.0
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
126 */
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
127 const gchar *purple_attachment_get_content_type(PurpleAttachment *attachment);
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
128
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
129 /**
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
130 * purple_attachment_get_local_uri:
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
131 * @attachment: The #PurpleAttachment instance.
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
132 *
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
133 * Gets the local URI if any for @attachment.
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
134 *
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
135 * Returns: (nullable): The local URI for @attachment.
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
136 *
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
137 * Since: 3.0.0
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
138 */
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
139 const gchar *purple_attachment_get_local_uri(PurpleAttachment *attachment);
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
140
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
141 /**
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
142 * purple_attachment_set_local_uri:
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
143 * @attachment: The #PurpleAttachment instance.
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
144 * @local_uri: The new local URI.
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
145 *
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
146 * Sets the local URI of @attachment.
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
147 *
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
148 * Since: 3.0.0
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
149 */
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
150 void purple_attachment_set_local_uri(PurpleAttachment *attachment, const gchar *local_uri);
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
151
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
152 /**
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
153 * purple_attachment_get_remote_uri:
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
154 * @attachment: The #PurpleAttachment instance.
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
155 *
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
156 * Gets the remote URI if any for @attachment.
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
157 *
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
158 * Returns: (nullable): The remote URI for @attachment.
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
159 *
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
160 * Since: 3.0.0
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
161 */
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
162 const gchar *purple_attachment_get_remote_uri(PurpleAttachment *attachment);
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
163
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
164 /**
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
165 * purple_attachment_set_remote_uri:
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
166 * @attachment: The #PurpleAttachment instance.
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
167 * @remote_uri: The new remote URI.
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
168 *
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
169 * Sets the remote URI of @attachment.
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
170 *
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
171 * Since: 3.0.0
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
172 */
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
173 void purple_attachment_set_remote_uri(PurpleAttachment *attachment, const gchar *remote_uri);
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
174
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
175 /**
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
176 * purple_attachment_get_size:
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
177 * @attachment: The #PurpleAttachment instance.
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
178 *
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
179 * Gets the size of @attachment.
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
180 *
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
181 * Returns: The size of @attachment.
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
182 *
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
183 * Since: 3.0.0
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
184 */
40540
168407b6f9fd Fix the prototypes for purple_attachment_[gs]et_size to match the actual implementation
Gary Kramlich <grim@reaperworld.com>
parents: 40539
diff changeset
185 guint64 purple_attachment_get_size(PurpleAttachment *attachment);
40526
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
186
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
187 /**
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
188 * purple_attachment_set_size:
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
189 * @attachment: The #PurpleAttachment instance.
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
190 * @size: The new size of @attachment.
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
191 *
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
192 * Sets the size of @attachment to @size.
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
193 *
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
194 * Since: 3.0.0
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
195 */
40540
168407b6f9fd Fix the prototypes for purple_attachment_[gs]et_size to match the actual implementation
Gary Kramlich <grim@reaperworld.com>
parents: 40539
diff changeset
196 void purple_attachment_set_size(PurpleAttachment *attachment, guint64 size);
40526
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
197
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
198 /**
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
199 * purple_attachment_get_filename:
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
200 * @attachment: The #PurpleAttachment instance.
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
201 *
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
202 * Gets the base filename for @attachment. Remote URI will be checked before
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
203 * local URI, but the basename of one of those is what will be returned.
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
204 *
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
205 * Returns: (transfer full): The filename for @attachment.
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
206 *
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
207 * Since: 3.0.0
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
208 */
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
209 gchar *purple_attachment_get_filename(PurpleAttachment *attachment);
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
210
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
211 G_END_DECLS
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
212
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
213 #endif /* PURPLE_ATTACHMENT_H */

mercurial