]> err.no Git - scalable-opengroupware.org/blob - UI/MailPartViewers/UIxMailRenderingContext.h
git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1127 d1b88da0-ebda-0310...
[scalable-opengroupware.org] / UI / MailPartViewers / UIxMailRenderingContext.h
1 /*
2   Copyright (C) 2004-2005 SKYRIX Software AG
3
4   This file is part of OpenGroupware.org.
5
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
9   later version.
10
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.
15
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
19   02111-1307, USA.
20 */
21
22 #ifndef __Mailer_UIxMailRenderingContext_H__
23 #define __Mailer_UIxMailRenderingContext_H__
24
25 #import <Foundation/NSObject.h>
26
27 /*
28   UIxMailRenderingContext
29   
30   The rendering context is used to track nesting of mail part viewers.
31 */
32
33 @class NSData, NSArray, NSDictionary;
34 @class WOContext, WOComponent;
35
36 @interface UIxMailRenderingContext : NSObject
37 {
38   WOComponent  *viewer;       /* non-retained! */
39   WOContext    *context;      /* non-retained! */
40   NSDictionary *flatContents; /* IMAP4 name to NSData */
41
42   WOComponent  *textViewer;
43   WOComponent  *imageViewer;
44   WOComponent  *linkViewer;
45   WOComponent  *messageViewer;
46   WOComponent  *iCalViewer;
47   WOComponent  *htmlViewer;
48 }
49
50 - (id)initWithViewer:(WOComponent *)_viewer context:(WOContext *)_ctx;
51
52 /* state */
53
54 - (void)reset;
55
56 /* fetching */
57
58 - (NSDictionary *)flatContents;
59 - (NSData *)flatContentForPartPath:(NSArray *)_partPath;
60
61 /* viewer components */
62
63 - (WOComponent *)viewerForBodyInfo:(id)_info;
64
65 @end
66
67
68 #include <NGObjWeb/WOContext.h>
69
70 @interface WOContext(UIxMailPart)
71
72 - (void)pushMailRenderingContext:(UIxMailRenderingContext *)_mctx;
73 - (UIxMailRenderingContext *)popMailRenderingContext;
74 - (UIxMailRenderingContext *)mailRenderingContext;
75
76 @end
77
78 #endif /* __Mailer_UIxMailRenderingContext_H__ */