htiui/HtiServicePlugins/HtiPIMServicePlugin/inc/HtiPIMServicePlugin.h
branchRCL_3
changeset 43 48060abbbeaf
parent 42 d40e813b23c0
child 45 b3cee849fa46
equal deleted inserted replaced
42:d40e813b23c0 43:48060abbbeaf
     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 CHtiSimDirHandler;
       
    35 // CLASS DECLARATION
       
    36 
       
    37 /**
       
    38 * Implementation of ECOM plug-in service interface.
       
    39 */
       
    40 class CHtiPIMServicePlugin : public CHTIServicePluginInterface
       
    41     {
       
    42     public:
       
    43 
       
    44         enum TCommand
       
    45             {
       
    46             EImportVCard            = 0x01,
       
    47             EImportVCalendar        = 0x02,
       
    48 
       
    49             EDeleteContact          = 0x03,
       
    50             EDeleteCalendar         = 0x04,
       
    51 
       
    52             ENotepadAddMemo         = 0x05,
       
    53             ENotepadAddMemoFromFile = 0x06,
       
    54             ENotepadDeleteAll       = 0x07,
       
    55 
       
    56             EOpenCalendarFile       = 0x08,
       
    57             EListCalendarFiles      = 0x09,
       
    58             
       
    59             ESimCardInfo            = 0x10,
       
    60             EImportSimContact       = 0x11,
       
    61             EDeleteSimContact       = 0x12,
       
    62 
       
    63             ECreateBookmark         = 0x1A,
       
    64             EDeleteBookmark         = 0x1B,
       
    65 
       
    66             EResultOk               = 0xFF // only for response message
       
    67             };
       
    68 
       
    69     public:
       
    70 
       
    71         static CHtiPIMServicePlugin* NewL();
       
    72 
       
    73         // Interface implementation
       
    74 
       
    75         /**
       
    76         * From CHTIServicePluginInterface
       
    77         * Called by the HTI Framework when sending message to this service.
       
    78         * @param aMessage message body destinated to a servive
       
    79         * @param aPriority message priority
       
    80         */
       
    81         void ProcessMessageL( const TDesC8& aMessage,
       
    82             THtiMessagePriority aPriority );
       
    83 
       
    84         /**
       
    85         * From CHTIServicePluginInterface
       
    86         * Indicates to HTI Framework whether the plugin is ready to process
       
    87         * a new message or if it's busy processing previous message.
       
    88         * @return ETrue if processing, EFalse if ready for new request
       
    89         */
       
    90         TBool IsBusy();
       
    91 
       
    92 
       
    93     protected:
       
    94 
       
    95         CHtiPIMServicePlugin();
       
    96         void ConstructL();
       
    97 
       
    98         virtual ~CHtiPIMServicePlugin();
       
    99 
       
   100     private:
       
   101 
       
   102         CPIMHandler* iPimHandler;
       
   103         CHtiBookmarkHandler* iBookmarkHandler;
       
   104         CHtiSimDirHandler* iSimDirHandler;
       
   105         };
       
   106 
       
   107 #endif // CHTIPIMSERVICEPLUGIN_H
       
   108 
       
   109 // End of file