meetingrequest/mrgui/inc/cesmrfieldbuilderinterface.h
changeset 0 8466d47a6819
child 4 e7aa27f58ae1
equal deleted inserted replaced
-1:000000000000 0:8466d47a6819
       
     1 /*
       
     2 * Copyright (c)  Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Definition for GUI extension interface
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CESMRFIELDBUILDERINTERFACE
       
    20 #define CESMRFIELDBUILDERINTERFACE
       
    21 
       
    22 #include <ecom.h>
       
    23 
       
    24 #include "esmrinternaluid.h"
       
    25 #include "mesmrfieldvalidator.h"
       
    26 #include "tesmrentryfield.h"
       
    27 #include "mesmrresponseobserver.h"
       
    28 
       
    29 class CESMRField;
       
    30 
       
    31 /**
       
    32  *  MESMRFieldBuilder is the interface of the field builder composite.
       
    33  *  All field builder implementations will return only this
       
    34  */
       
    35 class MESMRFieldBuilder
       
    36     {
       
    37 public:
       
    38     /**
       
    39      * Creates editor field.
       
    40      *
       
    41      * @param aValidator - time validator
       
    42      * @param aField - field to be created
       
    43      */
       
    44     virtual CESMRField* CreateEditorFieldL(
       
    45             MESMRFieldValidator* aValidator,
       
    46             TESMREntryField aField ) = 0;
       
    47 
       
    48     /**
       
    49      * Creates viewer field.
       
    50      *
       
    51      * @param aResponseObserver - observer to be called when e.g.
       
    52      *                            answer is ready to be sent.
       
    53      * @param aField - field to be created
       
    54      * @param aResponseReady - NOT IN USE
       
    55      */
       
    56     virtual CESMRField* CreateViewerFieldL(
       
    57             MESMRResponseObserver* aResponseObserver,
       
    58             TESMREntryField aField,
       
    59             TBool aResponseReady ) = 0;
       
    60     };
       
    61 
       
    62 class MESMRBuilderExtension
       
    63     {
       
    64 public: // Destruction
       
    65     ~MESMRBuilderExtension() {}
       
    66 
       
    67 public:
       
    68     /**
       
    69      * Put additional flags/checks here if needed
       
    70      */
       
    71     enum EMRCFSMailBoxCapability
       
    72         {
       
    73         EMRCFSAttendeeStatus = 0,
       
    74         EMRCFSResponseDontSend
       
    75         };
       
    76 
       
    77     /**
       
    78      * check if a cfsmailboxflag is set
       
    79      */
       
    80     virtual TBool CFSMailBoxCapabilityL( EMRCFSMailBoxCapability aCapa ) = 0;
       
    81 
       
    82     /**
       
    83      * Checks, whenter meeting request can be originated or not.
       
    84      * @param aForceResetDefaultMRMailbox Whether or not the default MR 
       
    85      * *      mailbox is to be forced to reset.
       
    86      * @return ETrue, if MR can be originated, EFalse otherwise.
       
    87      */
       
    88     virtual TBool MRCanBeOriginateedL( TBool aForceResetDefaultMRMailbox ) = 0;
       
    89     };
       
    90 
       
    91 /**
       
    92  *  MESMRFieldBuilder is the interface of the field builder composite.
       
    93  *  All field builder implementations will return only this
       
    94  */
       
    95 class CESMRFieldBuilderInterface : public CBase
       
    96     {
       
    97 public:
       
    98     /**
       
    99      * Create specific implementation
       
   100      */
       
   101     inline static CESMRFieldBuilderInterface* CreatePluginL( TUid aImplementationUid );
       
   102 
       
   103     /**
       
   104      * Destructor
       
   105      */
       
   106     inline virtual ~CESMRFieldBuilderInterface();
       
   107 
       
   108     /**
       
   109      * return field builder to caller, implemented in all plugins
       
   110      */
       
   111     virtual MESMRFieldBuilder* FieldBuilderL() = 0;
       
   112 
       
   113     /**
       
   114      * extends the ecom interface
       
   115      */
       
   116     virtual TAny* ExtensionL( TUid aExtensionUid ) = 0;
       
   117 
       
   118 private:
       
   119     // The ECom destructor key identifier
       
   120     TUid iDestructorIdKey;
       
   121     };
       
   122 
       
   123 // -----------------------------------------------------------------------------
       
   124 // CESMRFieldBuilderInterface::CreatePluginL
       
   125 // -----------------------------------------------------------------------------
       
   126 //
       
   127 inline CESMRFieldBuilderInterface* CESMRFieldBuilderInterface::CreatePluginL(  TUid aImplementationUid )
       
   128     {
       
   129     TAny* implementation = REComSession::CreateImplementationL( aImplementationUid,
       
   130                                                                 _FOFF(CESMRFieldBuilderInterface, iDestructorIdKey) );
       
   131     return reinterpret_cast<CESMRFieldBuilderInterface*>(implementation);
       
   132     }
       
   133 
       
   134 // -----------------------------------------------------------------------------
       
   135 // CESMRFieldBuilderInterface::~CESMRFieldBuilderInterface
       
   136 // -----------------------------------------------------------------------------
       
   137 //
       
   138 inline CESMRFieldBuilderInterface::~CESMRFieldBuilderInterface()
       
   139     {
       
   140     REComSession::DestroyedImplementation( iDestructorIdKey );
       
   141     }
       
   142 
       
   143 
       
   144 #endif // CESMRFIELDBUILDERINTERFACE