6 Copyright (c) 1991-2001, Be Incorporated. All rights reserved.
8 Permission is hereby granted, free of charge, to any person obtaining a copy of
9 this software and associated documentation files (the "Software"), to deal in
10 the Software without restriction, including without limitation the rights to
11 use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
12 of the Software, and to permit persons to whom the Software is furnished to do
13 so, subject to the following conditions:
15 The above copyright notice and this permission notice applies to all licensees
16 and shall be included in all copies or substantial portions of the Software.
18 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF TITLE, MERCHANTABILITY,
20 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
21 BE INCORPORATED BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
22 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION
23 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 Except as contained in this notice, the name of Be Incorporated shall not be
26 used in advertising or otherwise to promote the sale, use or other dealings in
27 this Software without prior written authorization from Be Incorporated.
29 BeMail(TM), Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered trademarks
30 of Be Incorporated in the United States and other countries. Other brand product
31 names are registered trademarks or trademarks of their respective holders.
38 #include <Application.h>
46 #include "QueryList.h"
53 class TSignatureWindow
;
56 class TMailApp
: public BApplication
{
61 virtual void ArgvReceived(int32
, char**);
62 virtual void MessageReceived(BMessage
*);
63 virtual bool QuitRequested();
64 virtual void ReadyToRun();
65 virtual void RefsReceived(BMessage
*);
67 TMailWindow
* FindWindow(const entry_ref
&);
69 TMailWindow
* NewWindow(const entry_ref
* rec
= NULL
,
70 const char* to
= NULL
, bool resend
= false,
71 BMessenger
* messenger
= NULL
);
73 void SetPrintSettings(const BMessage
* settings
);
74 bool HasPrintSettings();
75 BMessage
PrintSettings();
77 void SetLastWindowFrame(BRect frame
);
79 // TODO: move these into a MailSettings class
82 BString
ReplyPreamble();
84 bool AttachAttributes();
87 bool WarnAboutUnencodableCharacters();
88 bool StartWithSpellCheckOn();
89 void SetDefaultAccount(int32 account
);
90 int32
DefaultAccount();
91 int32
UseAccountFrom();
92 uint32
MailCharacterSet();
93 bool ShowSpamGUI() const
94 { return fShowSpamGUI
; }
97 QueryList
& PeopleQueryList()
98 { return fPeopleQueryList
; }
101 GroupList
& PeopleGroups()
102 { return fPeopleGroups
; }
105 void _ClearPrintSettings();
106 void _CheckForSpamFilterExistence();
107 TMailWindow
* _ActiveWindow();
109 status_t
GetSettingsPath(BPath
&path
);
110 status_t
LoadOldSettings();
111 status_t
SaveSettings();
112 status_t
LoadSettings();
116 TPrefsWindow
* fPrefsWindow
;
117 TSignatureWindow
* fSigWindow
;
119 BRect fMailWindowFrame
;
120 BRect fLastMailWindowFrame
;
121 BRect fSignatureWindowFrame
;
122 BPoint fPrefsWindowPos
;
124 BMessage
* fPrintSettings
;
126 bool fPrintHelpAndExit
;
128 // TODO: these should go into a settings class
131 char* fReplyPreamble
;
133 bool fAttachAttributes
;
136 bool fWarnAboutUnencodableCharacters
;
137 bool fStartWithSpellCheckOn
;
139 int32 fDefaultAccount
;
140 int32 fUseAccountFrom
;
141 uint32 fMailCharacterSet
;
144 QueryList fPeopleQueryList
;
146 GroupList fPeopleGroups
;
150 #endif // #ifndef _MAIL_H