meetingrequest/mricalviewer/inc/mesmricalviewerobserver.h
changeset 0 8466d47a6819
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/meetingrequest/mricalviewer/inc/mesmricalviewerobserver.h	Thu Dec 17 08:39:21 2009 +0200
@@ -0,0 +1,93 @@
+/*
+* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  ICal viewer's observer interface.
+*
+*/
+
+
+#ifndef MESMRICALVIEWEROBSERVER_H
+#define MESMRICALVIEWEROBSERVER_H
+
+// INCLUDES
+#include <e32cmn.h>
+//<cmail>
+#include "esmricalviewerdefs.hrh"      // tesmrmeetingrequestmethod
+#include "esmricalvieweropcodes.hrh"   // tesmricalvieweroperationtype
+//</cmail>
+
+// FORWARD DECLARATIONS
+class CFSMailMessage;
+
+// CLASS DECLARATIONS
+/**
+ * ICal viewer's observer interface.
+ * This is used to signal client about asynchronous operation's completion.
+ */
+class MESMRIcalViewerObserver
+    {
+    public: // Types
+        /**
+         * Result for iCal viewer operation
+         */
+        struct TIcalViewerOperationResult
+            {
+            /// Own: Type of the operation
+            TESMRIcalViewerOperationType iOpType;
+            /// Own: Operation result e.g. KErrCancel if user has canceled operation.
+            ///         System wide error code.
+            TInt iResultCode;
+            /// Own: Relevant only if the iOpType is EResolveMRMethod
+            TESMRMeetingRequestMethod iMethod;
+            /// Ref: Mail message related to this operation
+            CFSMailMessage* iMessage;
+            /// Own: Relevant only when user has responsed to MR
+            ///      Otherwise this is always set to EESMRAttendeeStatusUnknown
+            TESMRAttendeeStatus iAttendeeStatus;
+            };
+
+    public: // New functions
+        /**
+         * Called when the operation is completed succesfully.
+         *
+         * @param aResult A result of the operation.
+         */
+        virtual void OperationCompleted(
+                        TIcalViewerOperationResult aResult ) = 0;
+
+        /**
+         * Called when error occurs during the operation.
+         *
+         * @param aResult error result of the operation.
+         */
+        virtual void OperationError(
+                        TIcalViewerOperationResult aResult ) = 0;
+
+        /**
+         * Returns an extension point for this interface or NULL.
+         * @param aExtensionUid Uid of extension
+         * @return Extension point or NULL
+         */
+        virtual TAny* MRIcalViewerObserverExtension(
+                TUid /*aExtensionUid*/ ) { return NULL; }
+
+    protected: // construction and destruction
+        /**
+         * C++ Destructor
+         */
+        virtual ~MESMRIcalViewerObserver() { }
+    };
+
+#endif // MESMRICALVIEWEROBSERVER_H
+
+// End of file