2 ===========================================================================
5 Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company.
7 This file is part of the Doom 3 GPL Source Code (?Doom 3 Source Code?).
9 Doom 3 Source Code is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
14 Doom 3 Source Code is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with Doom 3 Source Code. If not, see <http://www.gnu.org/licenses/>.
22 In addition, the Doom 3 Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 Source Code. If not, please request a copy in writing from id Software at the address below.
24 If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
26 ===========================================================================
33 ===============================================================================
37 ===============================================================================
41 class idDeclEmail : public idDecl {
45 virtual size_t Size( void ) const;
46 virtual const char * DefaultDefinition( void ) const;
47 virtual bool Parse( const char *text, const int textLength );
48 virtual void FreeData( void );
49 virtual void Print( void ) const;
50 virtual void List( void ) const;
52 const char * GetFrom() const { return from; }
53 const char * GetBody() const { return text; }
54 const char * GetSubject() const { return subject; }
55 const char * GetDate() const { return date; }
56 const char * GetTo() const { return to; }
57 const char * GetImage() const { return image; }
69 class idDeclVideo : public idDecl {
73 virtual size_t Size( void ) const;
74 virtual const char * DefaultDefinition( void ) const;
75 virtual bool Parse( const char *text, const int textLength );
76 virtual void FreeData( void );
77 virtual void Print( void ) const;
78 virtual void List( void ) const;
80 const char * GetRoq() const { return video; }
81 const char * GetWave() const { return audio; }
82 const char * GetVideoName() const { return videoName; }
83 const char * GetInfo() const { return info; }
84 const char * GetPreview() const { return preview; }
95 class idDeclAudio : public idDecl {
99 virtual size_t Size( void ) const;
100 virtual const char * DefaultDefinition( void ) const;
101 virtual bool Parse( const char *text, const int textLength );
102 virtual void FreeData( void );
103 virtual void Print( void ) const;
104 virtual void List( void ) const;
106 const char * GetAudioName() const { return audioName; }
107 const char * GetWave() const { return audio; }
108 const char * GetInfo() const { return info; }
109 const char * GetPreview() const { return preview; }
119 class idDeclPDA : public idDecl {
121 idDeclPDA() { originalEmails = originalVideos = 0; };
123 virtual size_t Size( void ) const;
124 virtual const char * DefaultDefinition( void ) const;
125 virtual bool Parse( const char *text, const int textLength );
126 virtual void FreeData( void );
127 virtual void Print( void ) const;
128 virtual void List( void ) const;
130 virtual void AddVideo( const char *name, bool unique = true ) const;
131 virtual void AddAudio( const char *name, bool unique = true ) const;
132 virtual void AddEmail( const char *name, bool unique = true ) const;
133 virtual void RemoveAddedEmailsAndVideos() const;
135 virtual const int GetNumVideos() const;
136 virtual const int GetNumAudios() const;
137 virtual const int GetNumEmails() const;
138 virtual const idDeclVideo *GetVideoByIndex( int index ) const;
139 virtual const idDeclAudio *GetAudioByIndex( int index ) const;
140 virtual const idDeclEmail *GetEmailByIndex( int index ) const;
142 virtual void SetSecurity( const char *sec ) const;
144 const char * GetPdaName() const { return pdaName; }
145 const char * GetSecurity() const {return security; }
146 const char * GetFullName() const { return fullName; }
147 const char * GetIcon() const { return icon; }
148 const char * GetPost() const { return post; }
149 const char * GetID() const { return id; }
150 const char * GetTitle() const { return title; }
153 mutable idStrList videos;
154 mutable idStrList audios;
155 mutable idStrList emails;
162 mutable idStr security;
163 mutable int originalEmails;
164 mutable int originalVideos;
167 #endif /* !__DECLPDA_H__ */