searchui/indevicehandler/inc/indevicehandler.h
changeset 17 7d8c8d8f5eab
parent 2 208a4ba3894c
equal deleted inserted replaced
12:993ab30e92fc 17:7d8c8d8f5eab
    30 
    30 
    31 #ifndef DEFAULT_SEARCH_FIELD
    31 #ifndef DEFAULT_SEARCH_FIELD
    32 #define DEFAULT_SEARCH_FIELD "_aggregate"
    32 #define DEFAULT_SEARCH_FIELD "_aggregate"
    33 #endif
    33 #endif
    34 
    34 
    35 class QCPixSearcher;
    35 class CpixSearcher;
    36 class QCPixDocument;
    36 class CpixDocument;
    37 
       
    38 SEARCH_CLASS(SearchInDeviceHandlerTest)
    37 SEARCH_CLASS(SearchInDeviceHandlerTest)
    39 
    38 
    40 /**
    39 /**
    41  * InDeviceHandler is an interface class for UI and
    40  * InDeviceHandler is an interface class for UI and
    42  * CPix engine.
    41  * CPix engine.
    74 
    73 
    75     /**
    74     /**
    76      * Signalled when user requests for the result item
    75      * Signalled when user requests for the result item
    77      * error and result item will be returned
    76      * error and result item will be returned
    78      */
    77      */
    79     void handleDocument(int aError, QCPixDocument* aDoc);
    78     void handleDocument(int aError, CpixDocument* aDoc);
       
    79 
       
    80     /**
       
    81      * Signalled when user requests for the result item in batch
       
    82      * error and result item will be returned
       
    83      */
       
    84     void handleBatchDocument(int aError, int aCount, CpixDocument** aDoc);
    80 
    85 
    81 private slots:
    86 private slots:
    82 
    87 
    83     /**
    88     /**
    84      * slot connects to QCPixSearcher to get the status of search results 
    89      * slot connects to CpixSearcher to get the status of search results 
    85      * @since S60 ?S60_version.
    90      * @since S60 ?S60_version.
    86      * @param aError error code.
    91      * @param aError error code.
    87      * @param aEstimatedResultCount number of results
    92      * @param aEstimatedResultCount number of results
    88      */
    93      */
    89 
    94 
    90     void getSearchResult(int aError, int aEstimatedResultCount);
    95     void getSearchResult(int aError, int aEstimatedResultCount);
    91 
    96 
    92     /**
    97     /**
    93      * slot connects to QCPixSearcher to get the result item 
    98      * slot connects to CpixSearcher to get the result item 
    94      * @since S60 ?S60_version.
    99      * @since S60 ?S60_version.
    95      * @param aError error code.
   100      * @param aError error code.
    96      * @param aDocument result item
   101      * @param aDocument result item
    97      */
   102      */
    98     void getDocumentAsync(int aError, QCPixDocument* aDocument);
   103     void getDocumentAsync(int aError, CpixDocument* aDocument);
       
   104 
       
   105     /**
       
   106      * slot connects to CpixSearcher to get the result item 
       
   107      * @since S60 ?S60_version.
       
   108      * @param aError error code.
       
   109      * @param aCount number of result item.
       
   110      * @param aDocument array of Documents
       
   111      */
       
   112     void getBatchDocumentAsync(int aError, int aCount,
       
   113             CpixDocument** aDocument);
    99 
   114 
   100 public:
   115 public:
   101 
   116 
   102     /**
   117     /**
   103      * returns the result item synchronously.
   118      * returns the result item synchronously.
   104      * @since S60 ?S60_version.
   119      * @since S60 ?S60_version.
   105      * @param aIndex index 
   120      * @param aIndex index 
   106      */
   121      */
   107     QCPixDocument* getDocumentAtIndex(int aIndex);
   122     CpixDocument* getDocumentAtIndex(int aIndex);
   108 
   123 
   109     /**
   124     /**
   110      * returns the result item asynchronously.
   125      * returns the result item asynchronously.
   111      * @since S60 ?S60_version.
   126      * @since S60 ?S60_version.
   112      * @param aIndex index 
   127      * @param aIndex index 
   113      */
   128      */
   114     void getDocumentAsyncAtIndex(int aIndex);
   129     void getDocumentAsyncAtIndex(int aIndex);
   115 
   130 
   116   
   131     /**
       
   132      * returns the result item asynchronously.
       
   133      * @since S60 ?S60_version.
       
   134      * @param aIndex index 
       
   135      * @param aCount number of result item
       
   136      */
       
   137     void getBatchDocumentAsyncAtIndex(int aIndex, int aCount);
   117 
   138 
   118     /**
   139     /**
   119      * initate the search asynchronously.
   140      * initate the search asynchronously.
   120      * @since S60 ?S60_version.
   141      * @since S60 ?S60_version.
   121      * @param aSearchAsyncString search keyword
   142      * @param aSearchAsyncString search keyword
   154 
   175 
   155     /**
   176     /**
   156      * interface for CPix.
   177      * interface for CPix.
   157      * Own.
   178      * Own.
   158      */
   179      */
   159     QCPixSearcher *mSearchInterface;
   180     CpixSearcher *mSearchInterface;
   160 
   181 
   161     /**
   182     /**
   162      * number of results on current search.        
   183      * number of results on current search.        
   163      */
   184      */
   164     int mSearchResultCount;
   185     int mSearchResultCount;
   165 
   186 
   166 SEARCH_FRIEND_CLASS    (SearchInDeviceHandlerTest)
   187     SEARCH_FRIEND_CLASS (SearchInDeviceHandlerTest)
   167     };
   188     };
   168 
   189 
   169 #endif //INDEVICEHANDLER_H
   190 #endif //INDEVICEHANDLER_H