1
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2
/* camel-nntp-store.h : class for an nntp store */
6
* Copyright (C) 2000 Ximian, Inc. <toshok@ximian.com>
8
* This program is free software; you can redistribute it and/or
9
* modify it under the terms of version 2 of the GNU Lesser General Public
10
* License as published by the Free Software Foundation.
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU Lesser General Public License for more details.
17
* You should have received a copy of the GNU Lesser General Public License
18
* along with this program; if not, write to the Free Software
19
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
24
#ifndef CAMEL_NNTP_STORE_H
25
#define CAMEL_NNTP_STORE_H 1
27
#include <camel/camel-disco-store.h>
29
#include "camel-nntp-stream.h"
30
#include "camel-nntp-store-summary.h"
32
#define CAMEL_NNTP_STORE_TYPE (camel_nntp_store_get_type ())
33
#define CAMEL_NNTP_STORE(obj) (CAMEL_CHECK_CAST((obj), CAMEL_NNTP_STORE_TYPE, CamelNNTPStore))
34
#define CAMEL_NNTP_STORE_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_NNTP_STORE_TYPE, CamelNNTPStoreClass))
35
#define CAMEL_IS_NNTP_STORE(o) (CAMEL_CHECK_TYPE((o), CAMEL_NNTP_STORE_TYPE))
37
#define CAMEL_NNTP_EXT_SEARCH (1<<0)
38
#define CAMEL_NNTP_EXT_SETGET (1<<1)
39
#define CAMEL_NNTP_EXT_OVER (1<<2)
40
#define CAMEL_NNTP_EXT_XPATTEXT (1<<3)
41
#define CAMEL_NNTP_EXT_XACTIVE (1<<4)
42
#define CAMEL_NNTP_EXT_LISTMOTD (1<<5)
43
#define CAMEL_NNTP_EXT_LISTSUBSCR (1<<6)
44
#define CAMEL_NNTP_EXT_LISTPNAMES (1<<7)
48
struct _CamelNNTPFolder;
49
struct _CamelException;
51
typedef struct _CamelNNTPStore CamelNNTPStore;
52
typedef struct _CamelNNTPStoreClass CamelNNTPStoreClass;
54
typedef enum _xover_t {
60
struct _xover_header {
61
struct _xover_header *next;
68
struct _CamelNNTPStore {
69
CamelDiscoStore parent_object;
71
struct _CamelNNTPStorePrivate *priv;
75
unsigned int posting_allowed:1;
76
unsigned int do_short_folder_notation:1;
77
unsigned int folder_hierarchy_relative:1;
79
struct _CamelNNTPStoreSummary *summary;
81
struct _CamelNNTPStream *stream;
82
struct _CamelStreamMem *mem;
84
struct _CamelDataCache *cache;
86
char *current_folder, *storage_path, *base_url;
88
struct _xover_header *xover;
91
struct _CamelNNTPStoreClass {
92
CamelDiscoStoreClass parent_class;
96
/* Standard Camel function */
97
CamelType camel_nntp_store_get_type (void);
99
int camel_nntp_raw_commandv (CamelNNTPStore *store, struct _CamelException *ex, char **line, const char *fmt, va_list ap);
100
int camel_nntp_raw_command(CamelNNTPStore *store, struct _CamelException *ex, char **line, const char *fmt, ...);
101
int camel_nntp_raw_command_auth(CamelNNTPStore *store, struct _CamelException *ex, char **line, const char *fmt, ...);
102
int camel_nntp_command (CamelNNTPStore *store, struct _CamelException *ex, struct _CamelNNTPFolder *folder, char **line, const char *fmt, ...);
106
#endif /* CAMEL_NNTP_STORE_H */