searchfw/plugins/messagingplugin/inc/messagessearchplugin.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_MESSAGESSEARCHPLUGIN_H
       
    21 #define C_MESSAGESSEARCHPLUGIN_H
       
    22 
       
    23 //SYSTEM INCLUDES
       
    24 #include <searchplugin.h>
       
    25 #include <searchcontentsearcher.h>
       
    26 #include <searchcontent.h>
       
    27 #include <mtuireg.h>
       
    28 
       
    29 class CMessagesSearcher;
       
    30 
       
    31 
       
    32 /**
       
    33  *  This class is the plugin interface class for the messages pluging
       
    34  *
       
    35  *  This class searches the messages using the messaging center apis
       
    36  *
       
    37  *  @lib messagessearchplugin.lib
       
    38  */
       
    39 class CMessagesSearchPlugIn:public CSearchPlugin 
       
    40 {
       
    41 public: 
       
    42 
       
    43 /**
       
    44 * Ecom interface static factory method implementation.
       
    45 *
       
    46 * @return A pointer to the created instance of CMessagesSearchPlugIn
       
    47 */
       
    48 static CMessagesSearchPlugIn* NewL();
       
    49 
       
    50 
       
    51 /**
       
    52 * Destructor
       
    53 */
       
    54 ~CMessagesSearchPlugIn();
       
    55 
       
    56 public: //from base class CSearchPlugin	
       
    57 /**
       
    58 * From CSearchPlugin
       
    59 * Returns the reference of ContentSearcher.
       
    60 *
       
    61 * @param aContentIdArray Array of Content Ids to be searhed.
       
    62 * @param aCondition condition for Search.
       
    63 * @return MSearchContentSearcher pointer for Search.
       
    64 */
       
    65 MSearchContentSearcher* ContentSearcherL(  const RArray<TUid>& aContentIdArray, 
       
    66                                            const CSearchCondition& aCondition ,
       
    67                                            MSearchPluginObserver& aObserver );
       
    68                                         
       
    69 /**
       
    70 * From CSearchPlugin
       
    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 /**
       
    78 * From CSearchPlugin
       
    79 * Indicates if this plugin supports the searching of the given content.
       
    80 *
       
    81 * @param aContentId The ID of the search content.
       
    82 * @return ETrue if search is supported, EFalse otherwise.
       
    83 */
       
    84 TBool IsSupportedContent( TUid aContentId );
       
    85 
       
    86 
       
    87 /**
       
    88 * From CSearchPlugin
       
    89 * Launches a viewer/editor application for the given document id.
       
    90 *
       
    91 * @param aDocumentId Id of the document.
       
    92 */     
       
    93 void LaunchApplicationL(  const TDesC8& aLaunchInfo );
       
    94 
       
    95 private:
       
    96  /**
       
    97 * Constructor
       
    98 *
       
    99 * 
       
   100 */
       
   101 CMessagesSearchPlugIn();
       
   102 
       
   103 /** 
       
   104 * 2nd phase constructor
       
   105 *
       
   106 * 
       
   107 */
       
   108 void ConstructL();
       
   109 
       
   110 /**
       
   111 * Method for converting a descriptor into a number.
       
   112 *
       
   113 * @param    aDes    Descriptor containing the number
       
   114 * @param	aRadix	Number system to use when converting numbers into
       
   115 *                   a character format and vice versa.
       
   116 * @return	The converted number from the given descriptor.
       
   117 */
       
   118 static TUint32 GetNumFromDes( const TDesC& aDes,
       
   119 	                                         TRadix aRadix = EDecimal);
       
   120 
       
   121 /** Method for converting a descriptor into a number.
       
   122 *
       
   123 * @param    aDes    Descriptor containing the number
       
   124 * @param	aRadix	Number system to use when converting numbers into
       
   125 *                   a character format and vice versa.
       
   126 * @return	The converted number from the given descriptor.
       
   127 */
       
   128 static TUint32 GetNumFromDes( const TDesC8& aDes,
       
   129 	                                         TRadix aRadix = EDecimal);
       
   130 
       
   131 
       
   132 private: //Data members
       
   133 
       
   134 /**
       
   135 * Observes the searcher 
       
   136 * Not Own
       
   137 */
       
   138 CMessagesSearcher* iMsgsSearcher;
       
   139 
       
   140 /**
       
   141 * Observes the searcher 
       
   142 * Not Own
       
   143 */	
       
   144 MSearchPluginObserver*			iObserver;               
       
   145 
       
   146 /**
       
   147 * Is this plugin used for searching
       
   148 * Not Own
       
   149 */	
       
   150 TBool							iPlugInUsedForSearching; 
       
   151 
       
   152 /**
       
   153 * caption of Messages Content.
       
   154 * Own.
       
   155 */ 
       
   156 HBufC*     iMessagesCaption;
       
   157 
       
   158 /**
       
   159 * caption of Inbox Content
       
   160 * Own.
       
   161 */ 
       
   162 HBufC*     iInboxCaption;
       
   163 
       
   164 /**
       
   165 * caption of Sentbox Content
       
   166 * Own.
       
   167 */ 
       
   168 HBufC*     iSentboxCaption;
       
   169 
       
   170 /**
       
   171 * caption of Drafts Content
       
   172 * Own.
       
   173 */ 
       
   174 HBufC*     iDraftsCaption;
       
   175 
       
   176 /**
       
   177 * caption of Outbox Content.
       
   178 * Own.
       
   179 */ 
       
   180 HBufC*     iOutboxCaption;
       
   181 													 
       
   182 /**
       
   183 *  
       
   184 * Not Own
       
   185 */	
       
   186 TUid 							iDtor_ID_Key;
       
   187 
       
   188 /**
       
   189 * PLugin Id 
       
   190 * Not Own
       
   191 */	
       
   192 TUid							iMsgPluginId;
       
   193 
       
   194 /**
       
   195 * Service ID
       
   196 * Not Own
       
   197 */	
       
   198 TUid							iServiceId;
       
   199 
       
   200 /**
       
   201 * Array of content types for use with the observer, 1 plug-in may handle more
       
   202 * than 1 one content type.
       
   203 */
       
   204 RArray<TUid>                	iContentTypeArray;
       
   205 
       
   206 /**
       
   207 * .mif file name.
       
   208 */ 
       
   209 TFileName   mifFileName;
       
   210 
       
   211 
       
   212 };
       
   213 
       
   214 
       
   215 #endif //C_MESSAGESSEARCHPLUGIN_H