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