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
23 #ifndef __Database_NGImap4_NGImap4Message_H__
24 #define __Database_NGImap4_NGImap4Message_H__
26 #import <Foundation/NSObject.h>
27 #include <NGMime/NGPart.h>
28 #include <NGImap4/NGImap4Support.h>
30 @class NSArray, NSMutableDictionary;
33 @class NGImap4Context, NGImap4Folder, NGImap4FolderMailRegistry;
35 @interface NGImap4Message : NSObject
43 id<NGMimePart> message;
44 id<NGMimePart> bodyStructure;
47 NGImap4Context *context;
48 NGImap4Folder *folder; // not retained
49 NGImap4FolderMailRegistry *mailRegistry;
54 NSMutableDictionary *bodyStructureContent;
56 NSString *removeFlagNotificationName;
57 NSString *addFlagNotificationName;
62 - (id)initWithUid:(unsigned)_uid folder:(NGImap4Folder *)_folder
63 context:(NGImap4Context *)_ctx;
65 - (id)initWithUid:(unsigned)_uid headers:(NGHashMap *)_header
66 size:(unsigned)_size flags:(NSArray *)_flags folder:(NGImap4Folder *)_folder
67 context:(NGImap4Context *)_ctx;
71 - (NSException *)lastException;
72 - (void)resetLastException;
73 - (NGHashMap *)headers;
78 - (NSData *)contentsOfPart:(NSString *)_part;
79 - (id<NGMimePart>)bodyStructure;
80 - (id<NGMimePart>)message;
83 - (NGImap4Folder *)folder;
84 - (NGImap4Context *)context;
87 - (EOGlobalID *)globalID;
91 - (void)addFlag:(NSString *)_flag;
92 - (void)removeFlag:(NSString *)_flag;
100 - (void)markUnFlagged;
103 - (void)markAnswered;
104 - (void)markNotAnswered;
108 - (BOOL)isEqual:(id)_obj;
109 - (BOOL)isEqualToNGImap4Message:(NGImap4Message *)_messages;
113 #endif /* __Database_NGImap4_NGImap4Message_H__ */