00001 /* 00002 * ============================================================================ 00003 * Name : AknGlobalListQuery.h 00004 * Part of : Avkon 00005 * 00006 * Description: 00007 * Uses notification framework to show a global listquery. 00008 * Version: 00009 * 00010 * Copyright © 2002 Nokia Corporation. 00011 * This material, including documentation and any related 00012 * computer programs, is protected by copyright controlled by 00013 * Nokia Corporation. All rights are reserved. Copying, 00014 * including reproducing, storing, adapting or translating, any 00015 * or all of this material requires the prior written consent of 00016 * Nokia Corporation. This material also contains confidential 00017 * information which may not be disclosed to others without the 00018 * prior written consent of Nokia Corporation. 00019 * ============================================================================ 00020 */ 00021 #ifndef __AKNGLOBALLISTQUERY_H__ 00022 #define __AKNGLOBALLISTQUERY_H__ 00023 00024 #include <AknNotify.h> 00025 #include <aknnotifystd.h> 00026 00027 #include <bamdesca.h> 00028 00029 #start_since SINCE_3_1_SDK 00030 class CAknSDData; 00031 #end_since SINCE_3_1_SDK 00032 00033 00034 // Default index for list query 00035 const TInt KGlobalListQueryDefaultIndex = 0; 00036 00037 _LIT( KGlobalListQueryItemSeparator, "\n"); 00038 00075 NONSHARABLE_CLASS(CAknGlobalListQuery) : public CBase 00076 { 00077 public: 00081 IMPORT_C static CAknGlobalListQuery* NewL(); 00082 00087 IMPORT_C static CAknGlobalListQuery* NewLC(); 00088 00092 IMPORT_C ~CAknGlobalListQuery(); 00093 00102 IMPORT_C void ShowListQueryL( const MDesCArray* aItems, 00103 TRequestStatus& aStatus, 00104 const TInt aIndex = KGlobalListQueryDefaultIndex 00105 ); 00106 00110 IMPORT_C void MoveSelectionUp(); 00111 00115 IMPORT_C void MoveSelectionDown(); 00116 00120 IMPORT_C void SelectItem(); 00121 00125 IMPORT_C void CancelListQuery(); 00126 00134 IMPORT_C void SetHeadingL(const TDesC& aHeading); 00135 00136 #start_since SINCE_3_1_SDK 00137 00148 IMPORT_C void SetSecondaryDisplayData(CAknSDData* aData); 00149 #end_since SINCE_3_1_SDK 00150 private: 00154 IMPORT_C void UpdateListQuery(); 00155 00156 private: 00160 CAknGlobalListQuery(); 00161 00165 void ConstructL(); 00166 00167 private: 00168 // Command id 00169 TAknGlobalQueryCmd iCmd; 00170 // Notifier handle 00171 RNotifier iNotify; 00172 // Index to set which item will be selected 00173 TInt iIndex; 00174 // Buffer to hold the variables passed to server 00175 CBufFlat *iBuffer; 00176 // Pointer to buffer 00177 TPtrC8 iBufferPtr; 00178 HBufC* iHeading; 00179 CAknSDData* iAknSDData; 00180 TBuf8<1> iResultBuf; // not really used, but needed to prevent buffer handling errors 00181 }; 00182 00183 00184 #endif