searchfw/plugins/calendarplugin/inc/calendarsearchplugin.h
changeset 0 f979ecb2b13e
equal deleted inserted replaced
-1:000000000000 0:f979ecb2b13e
       
     1 /*
       
     2 * Copyright (c) 2006-2007 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:   ECom search interface definition.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef C_CALENDARSEARCHPLUGIN_H
       
    21 #define C_CALENDARSEARCHPLUGIN_H
       
    22 
       
    23 // system Includes
       
    24 #include <fbs.h>
       
    25 
       
    26 //Search FW Includes
       
    27 #include <searchplugin.h>
       
    28 
       
    29 class CCalendarSearcher;
       
    30 
       
    31 /**
       
    32 * Search plug-in interface implementaion for the Calendar database.
       
    33 *
       
    34 * This class searches the calendar entries.
       
    35 *
       
    36 * @lib calendarsearchplugin.lib
       
    37 */
       
    38 class CCalendarSearchPlugIn : public CSearchPlugin
       
    39     {
       
    40 public:
       
    41 
       
    42         /**
       
    43         * Ecom interface static factory method implementation.
       
    44         *
       
    45         * @return A pointer to the created instance of CSearchPlugin
       
    46         */
       
    47         static CCalendarSearchPlugIn* NewL();
       
    48         
       
    49         /**
       
    50         * Destructor
       
    51         *
       
    52         * Informs the ecom framework that this specific instance of the
       
    53         * interface has been destroyed.
       
    54         */
       
    55         virtual ~CCalendarSearchPlugIn();
       
    56 
       
    57 public: // from CSearchPlugIn
       
    58 
       
    59             /**
       
    60         * Returns the reference of ContentSearcher.
       
    61         *
       
    62         * @param aContentIdArray Array of Content Ids to be searhed.
       
    63         * @param aCondition condition for Search.
       
    64         * @return MSearchContentSearcher pointer for Search.
       
    65         */
       
    66         MSearchContentSearcher* ContentSearcherL(  const RArray<TUid>& aContentIdArray, 
       
    67                                                     const CSearchCondition& aCondition ,
       
    68                                                     MSearchPluginObserver& aObserver );
       
    69 
       
    70         /**
       
    71         * Returns the supported content of this plugin.
       
    72         *
       
    73         * @param aContent The content that this plugin can search.
       
    74         */
       
    75         void GetSupportedContentL( RPointerArray<CSearchContent>& aContent );
       
    76         /**
       
    77         * Indicates if this plugin supports the searching of the given content.
       
    78         *
       
    79         * @param aContentId The ID of the search content.
       
    80         * @return ETrue if search is supported, EFalse otherwise.
       
    81         */
       
    82         TBool IsSupportedContent( TUid aContentId );
       
    83 
       
    84         /**
       
    85         * Launches a viewer/editor application for the given document id.
       
    86         *
       
    87         * @param aLaunchInfo - Info for launching the calander entry
       
    88         */     
       
    89         void LaunchApplicationL( const  TDesC8& aLaunchInfo );
       
    90     
       
    91 private:
       
    92         /** 
       
    93         * Performs the first phase of two phase construction.
       
    94         *
       
    95         */
       
    96         CCalendarSearchPlugIn( );
       
    97 
       
    98         /** Performs the second phase construction */
       
    99         void ConstructL();
       
   100         
       
   101         /**
       
   102          * caption of Calendar Content.
       
   103          * Own.
       
   104          */ 
       
   105         HBufC*     iCalendarCaption;
       
   106         
       
   107         /**
       
   108          * caption of Anniversary Content
       
   109          * Own.
       
   110          */ 
       
   111         HBufC*     iAnniversaryCaption;
       
   112         
       
   113         /**
       
   114          * caption of Todo Content
       
   115          * Own.
       
   116          */ 
       
   117         HBufC*     iTodoCaption;
       
   118         
       
   119         /**
       
   120          * caption of Memo Content
       
   121          * Own.
       
   122          */ 
       
   123         HBufC*     iMemoCaption;
       
   124         
       
   125         /**
       
   126          * caption of Meeting Content.
       
   127          * Own.
       
   128          */ 
       
   129         HBufC*     iMeetingCaption;
       
   130         
       
   131         /**
       
   132          * .mif file name.
       
   133          */ 
       
   134         TFileName   mifFileName;
       
   135         /**
       
   136          * .The calander searcher
       
   137          */ 
       
   138         CCalendarSearcher* iCalendarSearcher;
       
   139     };
       
   140 
       
   141 #endif  // C_CALENDARSEARCHPLUGIN_H