organizer_plat/searchfw_launcher_api/inc/searchclientsession.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:  Client side session 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_SEARCHCLIENTSESSION_H
       
    20 #define C_SEARCHCLIENTSESSION_H
       
    21 
       
    22 // INCLUDE FILES
       
    23 #include <e32base.h>
       
    24 #include <e32std.h>
       
    25 #include <searchsessionobservers.h>
       
    26 #include <searchcommon.h>
       
    27 #include <searchresult.h>
       
    28 #include <searchcontent.h>
       
    29 #include <searchdocumentid.h>
       
    30 #include <searchquery.h>
       
    31 #include <searchcscommon.h>
       
    32 
       
    33 // FORWARD DECLARATIONS
       
    34 class CSearchClientSessionImp;
       
    35 
       
    36 
       
    37 // CLASS DECLARATION
       
    38 /**
       
    39   * This class represents a client side session to search framework.
       
    40   * This class is used by the Search UI.
       
    41   *
       
    42   * @lib    searchclient.lib
       
    43   */
       
    44 
       
    45 NONSHARABLE_CLASS( CSearchClientSession ) :public CBase
       
    46     {
       
    47 public:
       
    48     /**
       
    49      * Symbian OS 2 phased constructor.
       
    50      * @return - A pointer to the created instance of CSearchClientSession
       
    51      */
       
    52     IMPORT_C static CSearchClientSession* NewL();
       
    53 
       
    54     /**
       
    55      * Destructor
       
    56      */
       
    57     virtual ~CSearchClientSession();
       
    58 
       
    59     /**
       
    60      * Starts the search process. This call is asynchronous and progress is notified
       
    61      * through the observer.
       
    62      *
       
    63      *
       
    64      * @param aQuery - The search query.
       
    65      * @param aObserver - The search observer.
       
    66      * @param aThreshold - The threshold of the search (Example: maxResults, maxSearchInterval etc).
       
    67      */
       
    68     IMPORT_C void SearchL( const CSearchQuery& aQuery,
       
    69                            MSearchQueryObserver& aObserver,
       
    70                            const TSearchThreshold& aThreshold );
       
    71 
       
    72     IMPORT_C void CancelSearch( ) ;
       
    73 
       
    74     /**
       
    75      * Function returning a list of support content types that can be searched by the engine.
       
    76      *
       
    77      * @Param : aContent - On return, contains the array of supported content types. 
       
    78      * @param : aServiceId - The Type of service (Example:InDeviceSearch, ProximitySearch etc). 
       
    79      */
       
    80     IMPORT_C void GetSupportedContentL( RPointerArray<CSearchContent>& aContent,
       
    81                                         TUid aServiceId );
       
    82 
       
    83     /**
       
    84      * Gets supported service ids by the search framework.
       
    85      *
       
    86      * @param aContent - On return, contains the list of supported service ids.
       
    87      * 
       
    88      */
       
    89     IMPORT_C void GetSupportedServicesL( RArray<TUid>& aServiceIdArray );
       
    90 
       
    91     /**
       
    92      * Gets the search heavy results. 
       
    93      *
       
    94      * @param aResultIDArray - The array of document ids.
       
    95      * @param aObserver - Pointer to the observer through which the results are returned.
       
    96      * @return Request id -  This id is used to cancel the request.
       
    97      */    
       
    98     IMPORT_C void GetResultsL( const RPointerArray<CSearchDocumentId>& aResultIDArray,
       
    99                                      MSearchResultRetrieveObserver& aObserver );
       
   100     IMPORT_C void CancelGetResults( ) ;
       
   101     /**
       
   102      * Launches a viewer/editor application for the given document id.
       
   103      *
       
   104      * @param aResultId - The id of the given document to be launched.
       
   105      */    
       
   106     IMPORT_C  void LaunchApplicationL( const CSearchDocumentId& aResultId );
       
   107 
       
   108     /**
       
   109      * Get launch infor of a file to be opened.
       
   110      *
       
   111      */   
       
   112     IMPORT_C  HBufC8* GetLaunchInfoL( const CSearchDocumentId& aDocumentID );
       
   113 private:
       
   114 
       
   115     /**
       
   116      * Constructor.
       
   117      */
       
   118     CSearchClientSession();
       
   119 
       
   120     /**
       
   121      * 2nd phase constructor.
       
   122      */
       
   123     void ConstructL();
       
   124 
       
   125     // Data 
       
   126     /**
       
   127      * Pointer to the session imp
       
   128      * Own
       
   129      */
       
   130     CSearchClientSessionImp* iSessionImp;
       
   131     };
       
   132 
       
   133 
       
   134 #endif		// SEARCHCLIENTSESSION_H
       
   135 
       
   136 // End of File