1 #ifndef __MAPIAPPOINTMENT_H__
2 #define __MAPIAPPOINTMENT_H__
3 
4 ////////////////////////////////////////////////////////////////////////////////////////////////////////////
5 //
6 // File: MAPIAppointment.h
7 // Description: MAPI Appointment class wrapper
8 //
9 // Copyright (C) 2005-2011, Noel Dillabough
10 //
11 // This source code is free to use and modify provided this notice remains intact and that any enhancements
12 // or bug fixes are posted to the CodeProject page hosting this class for the community to benefit.
13 //
14 // Usage: see the CodeProject article at http://www.codeproject.com/internet/CMapiEx.asp
15 //
16 ////////////////////////////////////////////////////////////////////////////////////////////////////////////
17 
18 // Ported to U++ Framework by Koldo. See License.txt file
19 
20 class MAPIEx;
21 class MAPIAppointment;
22 
23 #ifdef _WIN32_WCE
24 #include "POOM.h"
25 #endif
26 
27 /////////////////////////////////////////////////////////////
28 // MAPIAppointment
29 
30 class MAPIAppointment : public MAPIObject {
31 public:
32 	MAPIAppointment();
33 	~MAPIAppointment();
34 
35 	enum { OUTLOOK_DATA2=0x00062002, OUTLOOK_APPOINTMENT_START=0x820D, OUTLOOK_APPOINTMENT_END=0x820E,
36 			OUTLOOK_APPOINTMENT_LOCATION=0x8208
37 	};
38 
39 // Attributes
40 protected:
41 #ifdef _WIN32_WCE
42 	IAppointment* m_pAppointment;
43 #endif
44 
45 // Operations
46 public:
47 #ifdef _WIN32_WCE
48 	bool Open(MAPIEx* pMAPI, IAppointment* pAppointment);
49 	virtual void Close();
50 
51 	virtual bool GetPropertyString(ULONG ulProperty, String& strProperty, bool bStream = false);
52 	virtual bool SetPropertyString(ULONG ulProperty, const String &szProperty, bool bStream = false);
53 #else
54 	String GetSubject();
55 	String GetLocation();
56 	Time GetTime(ULONG property);
57 	Time GetStartTime()		{return GetTime(OUTLOOK_APPOINTMENT_START);}
58 	Time GetEndTime()		{return GetTime(OUTLOOK_APPOINTMENT_END);}
59 
60 	bool SetSubject(const String &szSubject);
61 	bool SetLocation(const String &szLocation);
62 	bool SetStartTime(const Time &tm);
63 	bool SetEndTime(const Time &tm);
64 
65 	String GetMeetingUID();
66 #endif
67 };
68 
69 #define PR_APPOINTMENT_START PROP_TAG( PT_SYSTIME, MAPIAppointment::OUTLOOK_APPOINTMENT_START)
70 #define PR_APPOINTMENT_END PROP_TAG( PT_SYSTIME, MAPIAppointment::OUTLOOK_APPOINTMENT_END)
71 
72 #endif
73