libpurple/purpleattachment.h

Mon, 30 Jun 2025 14:22:13 -0500

author
Gary Kramlich <grim@reaperworld.com>
date
Mon, 30 Jun 2025 14:22:13 -0500
changeset 43269
1523eab3b5a0
parent 43147
835d74e5d22d
permissions
-rw-r--r--

Update the flatpak to gnome 48 and to the matching birb version

The birb version was missed here when it was updated.

Testing Done:
Built the flatpak with the instructions in the readme.

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

40526
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
1 /*
42594
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42391
diff changeset
2 * Purple - Internet Messaging Library
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42391
diff changeset
3 * Copyright (C) Pidgin Developers <devel@pidgin.im>
40526
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
4 *
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
5 * Purple is the legal property of its developers, whose names are too numerous
42594
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42391
diff changeset
6 * to list here. Please refer to the COPYRIGHT file distributed with this
40526
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
7 * source distribution.
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
8 *
42594
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42391
diff changeset
9 * This library is free software; you can redistribute it and/or modify it
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42391
diff changeset
10 * under the terms of the GNU General Public License as published by the Free
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42391
diff changeset
11 * Software Foundation; either version 2 of the License, or (at your option)
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42391
diff changeset
12 * any later version.
40526
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
13 *
42594
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42391
diff changeset
14 * This library is distributed in the hope that it will be useful, but WITHOUT
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42391
diff changeset
15 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42391
diff changeset
16 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42391
diff changeset
17 * more details.
40526
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
18 *
42594
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42391
diff changeset
19 * You should have received a copy of the GNU General Public License along with
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42391
diff changeset
20 * 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
21 */
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
22
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
23 #if !defined(PURPLE_GLOBAL_HEADER_INSIDE) && !defined(PURPLE_COMPILATION)
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
24 # error "only <purple.h> may be included directly"
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
25 #endif
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
26
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
27 #ifndef PURPLE_ATTACHMENT_H
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
28 #define PURPLE_ATTACHMENT_H
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
29
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
30 #include <glib-object.h>
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
31
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41686
diff changeset
32 #include "purpleversion.h"
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41686
diff changeset
33
40526
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
34 G_BEGIN_DECLS
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
35
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
36 #define PURPLE_TYPE_ATTACHMENT purple_attachment_get_type()
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
37
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
38 /**
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
39 * 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
40 *
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
41 * #PurpleAttachment represents a file attached to a #PurpleMessage.
42391
090b03385984 Add Since and symbol visibility to new-in-3.0 things
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42387
diff changeset
42 *
42613
780d7efe37c2 Remove the micro version from since tags for libpurple part 2
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
43 * Since: 3.0
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 */
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
42391
090b03385984 Add Since and symbol visibility to new-in-3.0 things
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42387
diff changeset
46 PURPLE_AVAILABLE_IN_3_0
40526
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
47 G_DECLARE_FINAL_TYPE(PurpleAttachment, purple_attachment, PURPLE, ATTACHMENT, GObject)
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
48
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
49 /**
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
50 * purple_attachment_new:
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
51 * @id: The identifier of the attachment.
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
52 * @content_type: The mime-type of the content.
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 * 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
55 *
42656
df9aafbae930 Add a doc-check unit test to libpurple and fix the issues it has found
Gary Kramlich <grim@reaperworld.com>
parents: 42613
diff changeset
56 * Returns: (transfer full): The new attachment.
df9aafbae930 Add a doc-check unit test to libpurple and fix the issues it has found
Gary Kramlich <grim@reaperworld.com>
parents: 42613
diff changeset
57 *
42613
780d7efe37c2 Remove the micro version from since tags for libpurple part 2
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
58 * Since: 3.0
40526
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
59 */
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41686
diff changeset
60 PURPLE_AVAILABLE_IN_3_0
43147
835d74e5d22d Make Purple.Attachment:id a string
Gary Kramlich <grim@reaperworld.com>
parents: 43146
diff changeset
61 PurpleAttachment *purple_attachment_new(const char *id, const char *content_type);
40526
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 /**
43144
627ee13c5dee Add a Purple.Attachment:inline property and other cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 42841
diff changeset
64 * purple_attachment_equal:
627ee13c5dee Add a Purple.Attachment:inline property and other cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 42841
diff changeset
65 * @attachment2: the second instance
627ee13c5dee Add a Purple.Attachment:inline property and other cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 42841
diff changeset
66 *
627ee13c5dee Add a Purple.Attachment:inline property and other cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 42841
diff changeset
67 * Checks if two attachments are equal.
627ee13c5dee Add a Purple.Attachment:inline property and other cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 42841
diff changeset
68 *
627ee13c5dee Add a Purple.Attachment:inline property and other cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 42841
diff changeset
69 * Attachments are considered equal if their [property@Attachment:id]
627ee13c5dee Add a Purple.Attachment:inline property and other cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 42841
diff changeset
70 * properties are equal.
627ee13c5dee Add a Purple.Attachment:inline property and other cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 42841
diff changeset
71 *
627ee13c5dee Add a Purple.Attachment:inline property and other cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 42841
diff changeset
72 * Returns: true if the attachments are equal; otherwise false.
627ee13c5dee Add a Purple.Attachment:inline property and other cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 42841
diff changeset
73 *
627ee13c5dee Add a Purple.Attachment:inline property and other cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 42841
diff changeset
74 * Since: 3.0
627ee13c5dee Add a Purple.Attachment:inline property and other cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 42841
diff changeset
75 */
627ee13c5dee Add a Purple.Attachment:inline property and other cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 42841
diff changeset
76 PURPLE_AVAILABLE_IN_3_0
627ee13c5dee Add a Purple.Attachment:inline property and other cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 42841
diff changeset
77 gboolean purple_attachment_equal(PurpleAttachment *attachment1, PurpleAttachment *attachment2);
627ee13c5dee Add a Purple.Attachment:inline property and other cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 42841
diff changeset
78
627ee13c5dee Add a Purple.Attachment:inline property and other cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 42841
diff changeset
79 /**
40526
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
80 * purple_attachment_get_id:
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
81 * @attachment: The #PurpleAttachment instance.
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
82 *
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
83 * Gets the ID from @attachment.
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
84 *
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
85 * Returns: The ID of @attachment.
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
86 *
42613
780d7efe37c2 Remove the micro version from since tags for libpurple part 2
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
87 * Since: 3.0
40526
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
88 */
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41686
diff changeset
89 PURPLE_AVAILABLE_IN_3_0
43147
835d74e5d22d Make Purple.Attachment:id a string
Gary Kramlich <grim@reaperworld.com>
parents: 43146
diff changeset
90 const char *purple_attachment_get_id(PurpleAttachment *attachment);
40526
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_set_id:
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 * @id: The new ID for @attachment.
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
96 *
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
97 * Sets the ID of @attachment to @id.
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
98 *
42613
780d7efe37c2 Remove the micro version from since tags for libpurple part 2
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
99 * Since: 3.0
40526
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
100 */
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41686
diff changeset
101 PURPLE_AVAILABLE_IN_3_0
43147
835d74e5d22d Make Purple.Attachment:id a string
Gary Kramlich <grim@reaperworld.com>
parents: 43146
diff changeset
102 void purple_attachment_set_id(PurpleAttachment *attachment, const char *id);
40526
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 /**
43144
627ee13c5dee Add a Purple.Attachment:inline property and other cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 42841
diff changeset
105 * purple_attachment_get_inline:
627ee13c5dee Add a Purple.Attachment:inline property and other cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 42841
diff changeset
106 *
627ee13c5dee Add a Purple.Attachment:inline property and other cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 42841
diff changeset
107 * Gets whether or not the attach should be displayed inline.
627ee13c5dee Add a Purple.Attachment:inline property and other cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 42841
diff changeset
108 *
627ee13c5dee Add a Purple.Attachment:inline property and other cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 42841
diff changeset
109 * Returns: true if the attachment should be displayed inline; otherwise false.
627ee13c5dee Add a Purple.Attachment:inline property and other cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 42841
diff changeset
110 *
627ee13c5dee Add a Purple.Attachment:inline property and other cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 42841
diff changeset
111 * Since: 3.0
627ee13c5dee Add a Purple.Attachment:inline property and other cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 42841
diff changeset
112 */
627ee13c5dee Add a Purple.Attachment:inline property and other cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 42841
diff changeset
113 PURPLE_AVAILABLE_IN_3_0
627ee13c5dee Add a Purple.Attachment:inline property and other cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 42841
diff changeset
114 gboolean purple_attachment_get_inline(PurpleAttachment *attachment);
627ee13c5dee Add a Purple.Attachment:inline property and other cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 42841
diff changeset
115
627ee13c5dee Add a Purple.Attachment:inline property and other cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 42841
diff changeset
116 /**
627ee13c5dee Add a Purple.Attachment:inline property and other cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 42841
diff changeset
117 * purple_attachment_set_inline:
627ee13c5dee Add a Purple.Attachment:inline property and other cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 42841
diff changeset
118 * @_inline: the new value
627ee13c5dee Add a Purple.Attachment:inline property and other cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 42841
diff changeset
119 *
627ee13c5dee Add a Purple.Attachment:inline property and other cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 42841
diff changeset
120 * Sets whether or not the attachment should be displayed inline.
627ee13c5dee Add a Purple.Attachment:inline property and other cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 42841
diff changeset
121 *
627ee13c5dee Add a Purple.Attachment:inline property and other cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 42841
diff changeset
122 * Since: 3.0
627ee13c5dee Add a Purple.Attachment:inline property and other cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 42841
diff changeset
123 */
627ee13c5dee Add a Purple.Attachment:inline property and other cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 42841
diff changeset
124 PURPLE_AVAILABLE_IN_3_0
627ee13c5dee Add a Purple.Attachment:inline property and other cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 42841
diff changeset
125 void purple_attachment_set_inline(PurpleAttachment *attachment, gboolean _inline);
627ee13c5dee Add a Purple.Attachment:inline property and other cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 42841
diff changeset
126
627ee13c5dee Add a Purple.Attachment:inline property and other cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 42841
diff changeset
127 /**
40526
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
128 * purple_attachment_get_content_type:
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
129 * @attachment: The #PurpleAttachment instance.
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
130 *
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
131 * Gets the content-type of @attachment.
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 * Returns: The content-type of @attachment.
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
134 *
42613
780d7efe37c2 Remove the micro version from since tags for libpurple part 2
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
135 * Since: 3.0
40526
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
136 */
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41686
diff changeset
137 PURPLE_AVAILABLE_IN_3_0
42841
fbb5c5cb37f4 Modernize files that start with purplea
Gary Kramlich <grim@reaperworld.com>
parents: 42656
diff changeset
138 const char *purple_attachment_get_content_type(PurpleAttachment *attachment);
40526
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
139
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
140 /**
43144
627ee13c5dee Add a Purple.Attachment:inline property and other cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 42841
diff changeset
141 * purple_attachment_set_content_type:
627ee13c5dee Add a Purple.Attachment:inline property and other cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 42841
diff changeset
142 * @content_type: (nullable): the new content-type
627ee13c5dee Add a Purple.Attachment:inline property and other cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 42841
diff changeset
143 *
627ee13c5dee Add a Purple.Attachment:inline property and other cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 42841
diff changeset
144 * Sets the content type of the attachment.
627ee13c5dee Add a Purple.Attachment:inline property and other cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 42841
diff changeset
145 *
627ee13c5dee Add a Purple.Attachment:inline property and other cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 42841
diff changeset
146 * Since: 3.0
627ee13c5dee Add a Purple.Attachment:inline property and other cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 42841
diff changeset
147 */
627ee13c5dee Add a Purple.Attachment:inline property and other cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 42841
diff changeset
148 PURPLE_AVAILABLE_IN_3_0
627ee13c5dee Add a Purple.Attachment:inline property and other cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 42841
diff changeset
149 void purple_attachment_set_content_type(PurpleAttachment *attachment, const char *content_type);
627ee13c5dee Add a Purple.Attachment:inline property and other cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 42841
diff changeset
150
627ee13c5dee Add a Purple.Attachment:inline property and other cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 42841
diff changeset
151 /**
40526
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
152 * purple_attachment_get_local_uri:
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
153 * @attachment: The #PurpleAttachment instance.
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
154 *
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
155 * Gets the local URI if any for @attachment.
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
156 *
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
157 * Returns: (nullable): The local URI for @attachment.
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
158 *
42613
780d7efe37c2 Remove the micro version from since tags for libpurple part 2
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
159 * Since: 3.0
40526
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
160 */
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41686
diff changeset
161 PURPLE_AVAILABLE_IN_3_0
42841
fbb5c5cb37f4 Modernize files that start with purplea
Gary Kramlich <grim@reaperworld.com>
parents: 42656
diff changeset
162 const char *purple_attachment_get_local_uri(PurpleAttachment *attachment);
40526
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_local_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 * @local_uri: The new local 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 local URI of @attachment.
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
170 *
42613
780d7efe37c2 Remove the micro version from since tags for libpurple part 2
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
171 * Since: 3.0
40526
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
172 */
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41686
diff changeset
173 PURPLE_AVAILABLE_IN_3_0
42841
fbb5c5cb37f4 Modernize files that start with purplea
Gary Kramlich <grim@reaperworld.com>
parents: 42656
diff changeset
174 void purple_attachment_set_local_uri(PurpleAttachment *attachment, const char *local_uri);
40526
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 /**
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
177 * purple_attachment_get_remote_uri:
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
178 * @attachment: The #PurpleAttachment instance.
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
179 *
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
180 * Gets the remote URI if any for @attachment.
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
181 *
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
182 * Returns: (nullable): The remote URI for @attachment.
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
183 *
42613
780d7efe37c2 Remove the micro version from since tags for libpurple part 2
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
184 * Since: 3.0
40526
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
185 */
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41686
diff changeset
186 PURPLE_AVAILABLE_IN_3_0
42841
fbb5c5cb37f4 Modernize files that start with purplea
Gary Kramlich <grim@reaperworld.com>
parents: 42656
diff changeset
187 const char *purple_attachment_get_remote_uri(PurpleAttachment *attachment);
40526
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
188
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
189 /**
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
190 * purple_attachment_set_remote_uri:
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
191 * @attachment: The #PurpleAttachment instance.
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
192 * @remote_uri: The new remote URI.
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 * Sets the remote URI of @attachment.
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
195 *
42613
780d7efe37c2 Remove the micro version from since tags for libpurple part 2
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
196 * Since: 3.0
40526
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
197 */
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41686
diff changeset
198 PURPLE_AVAILABLE_IN_3_0
42841
fbb5c5cb37f4 Modernize files that start with purplea
Gary Kramlich <grim@reaperworld.com>
parents: 42656
diff changeset
199 void purple_attachment_set_remote_uri(PurpleAttachment *attachment, const char *remote_uri);
40526
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
200
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 * purple_attachment_get_size:
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
203 * @attachment: The #PurpleAttachment instance.
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 * Gets the size of @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 * Returns: The size of @attachment.
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
208 *
42613
780d7efe37c2 Remove the micro version from since tags for libpurple part 2
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
209 * Since: 3.0
40526
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
210 */
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41686
diff changeset
211 PURPLE_AVAILABLE_IN_3_0
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
212 guint64 purple_attachment_get_size(PurpleAttachment *attachment);
40526
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
213
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
214 /**
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
215 * purple_attachment_set_size:
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
216 * @attachment: The #PurpleAttachment instance.
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
217 * @size: The new size of @attachment.
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
218 *
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
219 * Sets the size of @attachment to @size.
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
220 *
42613
780d7efe37c2 Remove the micro version from since tags for libpurple part 2
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
221 * Since: 3.0
40526
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
222 */
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41686
diff changeset
223 PURPLE_AVAILABLE_IN_3_0
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
224 void purple_attachment_set_size(PurpleAttachment *attachment, guint64 size);
40526
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
225
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
226 /**
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
227 * purple_attachment_get_filename:
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
228 * @attachment: The #PurpleAttachment instance.
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
229 *
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
230 * 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
231 * 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
232 *
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
233 * Returns: (transfer full): The filename for @attachment.
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
234 *
42613
780d7efe37c2 Remove the micro version from since tags for libpurple part 2
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
235 * Since: 3.0
40526
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
236 */
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41686
diff changeset
237 PURPLE_AVAILABLE_IN_3_0
42841
fbb5c5cb37f4 Modernize files that start with purplea
Gary Kramlich <grim@reaperworld.com>
parents: 42656
diff changeset
238 char *purple_attachment_get_filename(PurpleAttachment *attachment);
40526
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
239
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
240 G_END_DECLS
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
241
c8cc1a4c4a02 Add support for message attachments
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
242 #endif /* PURPLE_ATTACHMENT_H */

mercurial