/usr/include/evolution-data-server/camel/camel-imapx-command.h is in libcamel1.2-dev 3.10.4-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 | /*
* camel-imapx-command.h
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) version 3.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with the program; if not, see <http://www.gnu.org/licenses/>
*
*/
#if !defined (__CAMEL_H_INSIDE__) && !defined (CAMEL_COMPILATION)
#error "Only <camel/camel.h> can be included directly."
#endif
#ifndef CAMEL_IMAPX_COMMAND_H
#define CAMEL_IMAPX_COMMAND_H
#include "camel-imapx-utils.h"
#define CAMEL_IS_IMAPX_COMMAND(command) \
(camel_imapx_command_check (command))
G_BEGIN_DECLS
/* Avoid a circular reference. */
struct _CamelIMAPXJob;
struct _CamelIMAPXServer;
typedef struct _CamelIMAPXCommand CamelIMAPXCommand;
typedef struct _CamelIMAPXCommandPart CamelIMAPXCommandPart;
typedef void (*CamelIMAPXCommandFunc) (struct _CamelIMAPXServer *is,
CamelIMAPXCommand *ic);
typedef enum {
CAMEL_IMAPX_COMMAND_SIMPLE = 0,
CAMEL_IMAPX_COMMAND_DATAWRAPPER,
CAMEL_IMAPX_COMMAND_STREAM,
CAMEL_IMAPX_COMMAND_AUTH,
CAMEL_IMAPX_COMMAND_FILE,
CAMEL_IMAPX_COMMAND_STRING,
CAMEL_IMAPX_COMMAND_MASK = 0xff,
/* Continuation with LITERAL+ */
CAMEL_IMAPX_COMMAND_LITERAL_PLUS = 1 << 14,
/* Does this command expect continuation? */
CAMEL_IMAPX_COMMAND_CONTINUATION = 1 << 15
} CamelIMAPXCommandPartType;
struct _CamelIMAPXCommandPart {
gint data_size;
gchar *data;
CamelIMAPXCommandPartType type;
gint ob_size;
gpointer ob;
};
struct _CamelIMAPXCommand {
struct _CamelIMAPXServer *is;
gint pri;
/* Command name/type (e.g. FETCH) */
const gchar *name;
/* Folder to select */
CamelFolder *select;
/* Status for command, indicates it is complete if != NULL. */
struct _status_info *status;
guint32 tag;
GQueue parts;
GList *current_part;
/* Responsible for free'ing the command. */
CamelIMAPXCommandFunc complete;
};
CamelIMAPXCommand *
camel_imapx_command_new (struct _CamelIMAPXServer *is,
const gchar *name,
CamelFolder *select,
const gchar *format,
...);
CamelIMAPXCommand *
camel_imapx_command_ref (CamelIMAPXCommand *ic);
void camel_imapx_command_unref (CamelIMAPXCommand *ic);
gboolean camel_imapx_command_check (CamelIMAPXCommand *ic);
gint camel_imapx_command_compare (CamelIMAPXCommand *ic1,
CamelIMAPXCommand *ic2);
struct _CamelIMAPXJob *
camel_imapx_command_get_job (CamelIMAPXCommand *ic);
void camel_imapx_command_set_job (CamelIMAPXCommand *ic,
struct _CamelIMAPXJob *job);
void camel_imapx_command_add (CamelIMAPXCommand *ic,
const gchar *format,
...);
void camel_imapx_command_addv (CamelIMAPXCommand *ic,
const gchar *format,
va_list ap);
void camel_imapx_command_add_part (CamelIMAPXCommand *ic,
CamelIMAPXCommandPartType type,
gpointer data);
void camel_imapx_command_close (CamelIMAPXCommand *ic);
void camel_imapx_command_wait (CamelIMAPXCommand *ic);
void camel_imapx_command_done (CamelIMAPXCommand *ic);
void camel_imapx_command_failed (CamelIMAPXCommand *ic,
const GError *error);
gboolean camel_imapx_command_set_error_if_failed
(CamelIMAPXCommand *ic,
GError **error);
/* These are simple GQueue wrappers for CamelIMAPXCommands.
* They help make sure reference counting is done properly.
* Add more wrappers as needed, don't circumvent them. */
typedef struct _CamelIMAPXCommandQueue CamelIMAPXCommandQueue;
CamelIMAPXCommandQueue *
camel_imapx_command_queue_new (void);
void camel_imapx_command_queue_free (CamelIMAPXCommandQueue *queue);
void camel_imapx_command_queue_transfer
(CamelIMAPXCommandQueue *from,
CamelIMAPXCommandQueue *to);
void camel_imapx_command_queue_push_tail
(CamelIMAPXCommandQueue *queue,
CamelIMAPXCommand *ic);
void camel_imapx_command_queue_insert_sorted
(CamelIMAPXCommandQueue *queue,
CamelIMAPXCommand *ic);
gboolean camel_imapx_command_queue_is_empty
(CamelIMAPXCommandQueue *queue);
guint camel_imapx_command_queue_get_length
(CamelIMAPXCommandQueue *queue);
CamelIMAPXCommand *
camel_imapx_command_queue_peek_head
(CamelIMAPXCommandQueue *queue);
GList * camel_imapx_command_queue_peek_head_link
(CamelIMAPXCommandQueue *queue);
gboolean camel_imapx_command_queue_remove
(CamelIMAPXCommandQueue *queue,
CamelIMAPXCommand *ic);
void camel_imapx_command_queue_delete_link
(CamelIMAPXCommandQueue *queue,
GList *link);
CamelIMAPXCommand *
camel_imapx_command_queue_ref_by_tag
(CamelIMAPXCommandQueue *queue,
guint32 tag);
G_END_DECLS
#endif /* CAMEL_IMAPX_COMMAND_H */
|