2 Copyright (C) 2000-2004 SKYRIX Software AG
4 This file is part of OpenGroupware.org.
6 OGo is free software; you can redistribute it and/or modify it under
7 the terms of the GNU Lesser General Public License as published by the
8 Free Software Foundation; either version 2, or (at your option) any
11 OGo is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
14 License for more details.
16 You should have received a copy of the GNU Lesser General Public
17 License along with OGo; see the file COPYING. If not, write to the
18 Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
22 #ifndef __Networking_NGImap4_NGSieveClient_H__
23 #define __Networking_NGImap4_NGSieveClient_H__
25 #import <Foundation/NSObject.h>
26 #include <NGStreams/NGStreams.h>
27 #include <NGStreams/NGSocketProtocols.h>
28 #include <NGImap4/NGImap4Support.h>
29 #include <NGImap4/NGImap4ResponseParser.h>
31 @class NSMutableArray, NSString, NSNumber, NSDictionary, NSArray;
32 @class NGSieveResponseParser, EOQualifier, NGHashMap;
35 UnConnected_NGSieveState = 1,
36 NonAuthenticated_NGSieveState,
37 Authenticated_NGSieveState,
40 @interface NGSieveClient : NSObject
43 id<NGActiveSocket> socket;
44 id<NGExtendedTextStream> text;
45 id<NGSocketAddress> address;
46 NGImap4ResponseParser *parser;
56 + (id)clientWithAddress:(id<NGSocketAddress>)_address;
57 + (id)clientWithHost:(id)_host;
59 - (id)initWithHost:(id)_host;
60 - (id)initWithAddress:(id<NGSocketAddress>)_address;
64 - (id<NGActiveSocket>)socket;
65 - (id<NGSocketAddress>)address;
69 - (NSDictionary *)openConnection;
70 - (void)closeConnection;
71 - (NSNumber *)isConnected;
76 - (NSDictionary *)login:(NSString *)_login password:(NSString *)_passwd;
77 - (NSDictionary *)logout;
79 - (NSDictionary *)getScript:(NSString *)_scriptName;
80 - (NSDictionary *)putScript:(NSString *)_name script:(NSString *)_script;
81 - (NSDictionary *)setActiveScript:(NSString *)_name;
82 - (NSDictionary *)deleteScript:(NSString *)_script;
83 - (NSDictionary *)listScript:(NSString *)_script;
87 - (BOOL)isEqualToSieveClient:(NGSieveClient *)_obj;
91 #endif /* __Networking_NGSieve_NGSieveClient_H__ */