htiui/HtiServicePlugins/HtiPIMServicePlugin/inc/HtiPIMServicePlugin.h
changeset 0 d6fe6244b863
child 17 4f2773374eff
equal deleted inserted replaced
-1:000000000000 0:d6fe6244b863
       
     1 /*
       
     2 * Copyright (c) 2009 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:  Implementation of ECOM plug-in service interface. Provides
       
    15 *                PIM service (vCard & vCalendar import).
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef CHTIPIMSERVICEPLUGIN_H
       
    21 #define CHTIPIMSERVICEPLUGIN_H
       
    22 
       
    23 // INCLUDES
       
    24 #include <HTIServicePluginInterface.h>
       
    25 #include <w32std.h>
       
    26 
       
    27 // CONSTANTS
       
    28 const TInt KPIMServiceUidValue = 0x10210CCD; // ECOM Implementation UID
       
    29 const TUid KPIMServiceUid = { KPIMServiceUidValue };
       
    30 
       
    31 // FORWARD DECLARATIONS
       
    32 class CPIMHandler;
       
    33 class CHtiBookmarkHandler;
       
    34 class CHtiSimDirHandlerVPbk;
       
    35 
       
    36 // CLASS DECLARATION
       
    37 
       
    38 /**
       
    39 * Implementation of ECOM plug-in service interface.
       
    40 */
       
    41 class CHtiPIMServicePlugin : public CHTIServicePluginInterface
       
    42     {
       
    43     public:
       
    44 
       
    45         enum TCommand
       
    46             {
       
    47             EImportVCard            = 0x01,
       
    48             EImportVCalendar        = 0x02,
       
    49 
       
    50             EDeleteContact          = 0x03,
       
    51             EDeleteCalendar         = 0x04,
       
    52 
       
    53             ENotepadAddMemo         = 0x05,
       
    54             ENotepadAddMemoFromFile = 0x06,
       
    55             ENotepadDeleteAll       = 0x07,
       
    56 
       
    57             ESimCardInfo            = 0x10,
       
    58             EImportSimContact       = 0x11,
       
    59             EDeleteSimContact       = 0x12,
       
    60 
       
    61             ECreateBookmark         = 0x1A,
       
    62             EDeleteBookmark         = 0x1B,
       
    63 
       
    64             EResultOk               = 0xFF // only for response message
       
    65             };
       
    66 
       
    67     public:
       
    68 
       
    69         static CHtiPIMServicePlugin* NewL();
       
    70 
       
    71         // Interface implementation
       
    72 
       
    73         /**
       
    74         * From CHTIServicePluginInterface
       
    75         * Called by the HTI Framework when sending message to this service.
       
    76         * @param aMessage message body destinated to a servive
       
    77         * @param aPriority message priority
       
    78         */
       
    79         void ProcessMessageL( const TDesC8& aMessage,
       
    80             THtiMessagePriority aPriority );
       
    81 
       
    82         /**
       
    83         * From CHTIServicePluginInterface
       
    84         * Indicates to HTI Framework whether the plugin is ready to process
       
    85         * a new message or if it's busy processing previous message.
       
    86         * @return ETrue if processing, EFalse if ready for new request
       
    87         */
       
    88         TBool IsBusy();
       
    89 
       
    90 
       
    91     protected:
       
    92 
       
    93         CHtiPIMServicePlugin();
       
    94         void ConstructL();
       
    95 
       
    96         virtual ~CHtiPIMServicePlugin();
       
    97 
       
    98     private:
       
    99 
       
   100         CPIMHandler* iPimHandler;
       
   101         CHtiBookmarkHandler* iBookmarkHandler;
       
   102         CHtiSimDirHandlerVPbk* iSimDirHandler;
       
   103         };
       
   104 
       
   105 #endif // CHTIPIMSERVICEPLUGIN_H
       
   106 
       
   107 // End of file