Portability Libraries  2015.2.0.0
Common Methods and Objects for Platform Independance.
action.hpp
Go to the documentation of this file.
1 //
2 // BEGIN_DOUGLAS_MARK_ROYER_COPYRIGHT
3 //
4 // Copyright (C) 1993-2012 Douglas Mark Royer, All Rights Reserved.
5 //
6 // NOTICE:
7 //
8 // THIS SOURCE CODE BELONGS TO DOUGLAS MARK ROYER
9 // THIS CODE IS CONSIDERED A
10 // TRADE SECRET AND IS NOT TO BE DIVULGED OR USED BY PARTIES WHO HAVE
11 // NOT RECEIVED WRITTEN AUTHORIZATION FROM THE OWNER.
12 //
13 //
14 // THIS SOFTWARE AND MANUAL ARE BOTH PROTECTED BY UNITED STATES
15 // COPYRIGHT LAW (TITLE 17 UNITED STATES CODE). UNAUTHORIZED REPRODUCTION
16 // AND/OR SALE MAY RESULT IN IMPRISONMENT OF UP TO ONE YEAR AND FINES
17 // OF UP TO $100,000 (17 USC 506). COPYRIGHT INFRINGERS MAY ALSO
18 // BE SUBJECT TO CIVIL LIABILITY.
19 //
20 // THIS NOTICE AND THE ABOVE COPYRIGHT NOTICE MUST REMAIN IN ALL
21 // COPIES AND ANY DERIVED WORK.
22 //
23 // ALL OF THIS CODE IS ORIGINAL WORK BY THE COPYRIGHT HOLDER.
24 //
25 // THIS DOCUMENT AND THE INFORMATION CONTAINED HEREIN IS
26 // PROVIDED ON AN "AS IS" BASIS AND INET-CONSULTING.COM, INC.
27 // DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT
28 // NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
29 // HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
30 // WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR
31 // PURPOSE. ANY SERVICE CONTRACT WILL BE UNDER A SEPARATE
32 // LICENSE.
33 //
34 // END_DOUGLAS_MARK_ROYER_COPYRIGHT
35 //
36 
37 /**
38  * @author Doug Royer / SoftwareAndServices
39  * @file
40  * This is a class and interfaces in C and C++ that represents calendar action
41  * data. It is designed to be compatible with RFC-iCalendar, RFC-iTIP, RFC-iMIP,
42  * CAP, and current WebDAV and CalDAV calendars.
43  */
44 
45 #ifndef __DOUGLAS_MARK_ROYER_LIBRARY_ICALENDAR_ACTION_HPP__
46 #define __DOUGLAS_MARK_ROYER_LIBRARY_ICALENDAR_ACTION_HPP__
47 
48 #ifndef EXPORT_ICALENDAR
49 #ifdef BUILDING_LIBRARY_ICALENDAR
50 #define EXPORT_ICALENDAR EXPORT_OUT
51 #else
52 #define EXPORT_ICALENDAR EXPORT_IN
53 #endif
54 #endif
55 
56 #ifdef BUILDING_LIBRARY_ICALENDAR
57 #include "iCalendar.hpp"
58 #include "text.hpp"
59 #include "text_property.hpp"
60 #else
61 #include <SaS/iCalendar/iCalendar.hpp>
62 #include <SaS/iCalendar/text.hpp>
63 #include <SaS/iCalendar/text_property.hpp>
64 #endif
65 
66 using namespace std;
70 
71 namespace SoftwareAndServices
72 {
73  namespace Library
74  {
75  namespace iCalendar
76  {
77  /**
78  * @class action action.hpp "<SaS/iCalendar/action.hpp>"
79  * This object represents the iCalendar ACTION property.
80  *
81  * @see The full \ref RFC2445_Page "iCalendar specification"
82  *
83  * The action property is used in the
84  * SoftwareAndServices::Libary::iCalendar::valarm iCalendar component.
85  * @see SoftwareAndServices::Libary::iCalendar::valarm
86  *
87  * Class: \ref SoftwareAndServices::Library::iCalendar::action "action class"
88  * @see \ref RFC2445_Page "RFC-2445"
89  *
90  * RFC-2445:4.8.6.1 Action
91  *
92  * Property Name: ACTION
93  *
94  * Purpose: This property defines the action to be invoked when an
95  * alarm is triggered.
96  *
97  * Value Type: TEXT
98  *
99  * Property Parameters: Non-standard property parameters can be
100  * specified on this property.
101  *
102  * Conformance: This property MUST be specified once in a "VALARM"
103  * calendar component.
104  *
105  * Description: Each "VALARM" calendar component has a particular type
106  * of action associated with it. This property specifies the type of
107  * action
108  *
109  * Format Definition: The property is defined by the following
110  * notation:
111  *
112  * @code
113  *
114  * action = "ACTION" actionparam ":" actionvalue CRLF
115  *
116  * actionparam = *(";" xparam)
117  *
118  * actionvalue = "AUDIO" / "DISPLAY" / "EMAIL"
119  * / "PROCEDURE" / iana-token / x-name
120  *
121  * @endcode
122  *
123  * Example: The following are examples of this property in a "VALARM"
124  * calendar component:
125  *
126  * - ACTION:AUDIO
127  * - ACTION:DISPLAY
128  * - ACTION:PROCEDURE
129  * - ACTION:EMAIL
130  */
131  class EXPORT_ICALENDAR action
132  : public text_property
133  {
134  public:
135 
136  /**
137  * action - Default Constructor.
138  *
139  * Default ACTION property constructor.
140  * The value is set to an empty string.
141  */
142  action();
143 
144  /**
145  * action - TEXT constructor.
146  *
147  * ACTION property TEXT constructor.
148  *
149  * @param InitialValue Initialize the ACTION property to 'value'.
150  *
151  * @Throws iCalError When a recoverable parse error occurs.
152  *
153  * @Throws ThrowableError When an unexpected error occurs.
154  */
155  action(const text * InitialValue);
156 
157  /**
158  * ACTION property (char *) constructor.
159  *
160  * @param InitialValue Initialize the ACTION property to 'value'.
161  *
162  * @Throws iCalError When a recoverable parse error occurs.
163  *
164  * @Throws ThrowableError When an unexpected error occurs.
165  */
166  action(const char * InitialValue);
167 
168  /**
169  * ACTION propert Token constructor.
170  *
171  * @param InitialValue The initial value.
172  * Takes one of DISPLAY_t, AUDIO_t, PROCEDURE_t, or EMAIL_t.
173  *
174  * @Throws iCalError When a recoverable parse error occurs.
175  *
176  * @Throws ThrowableError When an unexpected error occurs.
177  */
178  action(Tokens_t InitialValue);
179 
180  /**
181  * ACTION property destructor.
182  */
183  virtual ~action();
184 
185  /**
186  * Do minimal ACTION property validation.
187  */
188  virtual bool valid() const;
189  };
190 
191  /**
192  * @typedef actionVec
193  * A vector (array) of action objects.
194  */
195  typedef vector<action*> actionVec;
196 
197  }
198  }
199 }
200 
201 #endif /*__DOUGLAS_MARK_ROYER_LIBRARY_ICALENDAR_ACTION_HPP__*/
STL namespace.