qtmeetings sources to Maemo garage
[qtmeetings] / src / Domain / Meeting.h
1 #ifndef MEETING_H_
2 #define MEETING_H_
3
4 #include <QString>
5 #include <QDateTime>
6 #include "Room.h"
7
8 //! Domain class. Describe appointments on Microsoft Exchange Server 2007.
9 /*!
10  * Domain class. Describe appointments on Microsoft Exchange Server 2007.
11  */
12 class Meeting
13 {
14 public:
15         //! Constructor.
16         /*!
17          * Constructor to initialize a Meeting instance.
18          * \param aRoom Pointer to the Room instance where the meeting will be held.
19          * \param aStartsAt The date and time when the meeting starts.
20          * \param aEndsAt The date and time when the meeting ends.
21          * \param aOrganizer The e-mail address of the organizer.
22          * \param aSubject The subject of the meeting.
23          */
24         Meeting( const QString &aPrimaryId,
25                          const Room &aRoom,
26                          const QDateTime &aStartsAt,
27                          const QDateTime &aEndsAt,
28                          const QString &aSubject = "",
29                          const QString &aOrganizerName = "",
30                          const QString &aOrganizerEMail = "",
31                          const QString &aDescription = "" );
32         //! Destructor.
33         virtual ~Meeting();
34         //! Gets the primary identifier of the meeting.
35         /*!
36          * Gets the primary identifier of the meeting. The primary ID comes from the availability service
37          * which is used in Communication module to fetch the meetings at first. Secondary ID is needed to
38          * get more details of the meeting when user wants to open MeetingInfoDialog by clicking on cerain
39          * meeting in the schedule.
40          * \return Primary ID might be provided by the Microsoft Exchange Availability Service.
41          */
42         QString primaryId() const;
43         //! Gets the secondary identifier of the meeting.
44         /*!
45          * Gets the secondary identifier of the meeting. The primary ID comes from the availability service
46          * which is used in Communication module to fetch the meetings at first. Secondary ID is needed to
47          * get more details of the meeting when user wants to open MeetingInfoDialog by clicking on cerain
48          * meeting in the schedule.
49          * \return Secondary ID is provided by the translating the Primary one to Secondaty.
50          */
51         QString secondaryId() const;
52         //! Gets the room where the meeting is held.
53         /*!
54          * Gets the Room instance which identified the location of the meeting.
55          * \return Pointer to the Room instance.
56          */
57         Room room() const;
58         //! Gets the organizer.
59         /*!
60          * Gets formatted string which contains the organizer's name and mail address.
61          * \return The organizer's name and mail address.
62          */
63         QString organizer() const;
64         //! Gets the date and time when the meeting starts.
65         /*!
66          * Gets the date and time when the meeting starts.
67          * \return The date and time.
68          */
69         QDateTime startsAt() const;
70         //! Gets the date and time when the meeting ends.
71         /*!
72          * Gets the date and time when the meeting ends.
73          * \return The date and time.
74          */
75         QDateTime endsAt() const;
76         //! Gets the subject of the meeting.
77         /*!
78          * Gets the subject of the meeting.
79          * \return The description of the meeting's subject.
80          */
81         QString subject() const;
82         //! Gets the description of the meeting.
83         /*!
84          * Gets the description of the meeting. This field is a detailed description of the topic of the
85          * meeting provided by the meeting organizer. Note it can contain confidential information.
86          * \return The description of the meeting.
87          */
88         QString description() const;
89         //! Indicates if all the details of the current Meeting instance are available or not.
90         /*!
91          * Indicates if all the details of the current Meeting instance are available or not. If yes, then
92          * Secondary ID is valid, otherwise not.
93          * \return TRUE if yes; otherwise, false.
94          */
95         bool detailsAvailable() const;
96
97         //! Sets the secondary Id of the current meeting.
98         /*!
99          * Sets the secondary Id of the current meeting.
100          * \param aSecondaryId The secondary ID provided by translating to Primary into Secondary.
101          */
102         void setSecondaryId( const QString& aSecondaryId );
103         //! Sets the organizer of the meeting.
104         /*!
105          * Sets the organizer of the meeting.
106          * \param aOrganizerName The name of the organizer.
107          * \param aOrganizerEMail The e-mail address of the organizer.
108          */
109         void setOrganizer( const QString &aOrganizerName, const QString &aOrganizerEMail );
110         //! Sets the date and time when the meeting starts.
111         /*!
112          * Sets the date and time when the meeting starts.
113          * \param aNewStart The new date and time.
114          */
115         void setStartsAt( QDateTime aNewStart );
116         //! Sets the date and time when the meeting endss.
117         /*!
118          * Sets the date and time when the meeting endss.
119          * \param aNewEnd The new date and time.
120          */
121         void setEndsAt( QDateTime aNewEnd );
122         //! Sets new subject to the meeting.
123         /*!
124          * Sets new subject to the meeting.
125          * \param aSubject The description of the new subject.
126          */
127         void setSubject( const QString &aSubject );
128         //! Sets new description to the meeting.
129         /*!
130          * Sets new description to the meeting.
131          * \param aDescription The description of the meeting.
132          */
133         void setDescription( const QString &aDescription );
134         //! Checks if two objects are equal.
135         /*!
136          * Checks if the another same type object is equal to the current instance.
137          * \param *aOther The pointer to another Meeting class instance.
138          * \return TRUE if equals; otherwise, FALSE.
139          */
140         bool equals( const Meeting &aOther ) const;
141         //! Checks if two Meetings are overlaping.
142         /*!
143          * Checks if the current Meeting instance overlaps the parameter one.
144          * \param *aOther The pointer to another Meeting class instance.
145          * \return TRUE if overlaps; otherwise, FALSE.
146          */
147         bool overlaps( const Meeting &aOther ) const;
148         //! Makes a string to identify a meeting.
149         /*!
150          * Makes string representation of the current Meeting instance.
151          * \return The string.
152          */
153         QString toString() const;
154
155 private:
156         QString iPrimaryId;
157         QString iSecondaryId;
158         Room iRoom;
159         QDateTime iStartsAt;
160         QDateTime iEndsAt;
161         QString iSubject;
162         QString iOrganizerName;
163         QString iOrganizerEMail;
164         QString iDescription;
165         bool iDetailsAvailable;
166
167 };
168
169 #endif /*MEETING_H_*/