1 /* |
|
2 * Copyright (c) 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: Definition of the class CPbkxRemoteContactLookupServiceUiContext |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CPBKXREMOTECONTACTLOOKUPSERVICEUICONTEXT_H |
|
20 #define CPBKXREMOTECONTACTLOOKUPSERVICEUICONTEXT_H |
|
21 |
|
22 #include <cntitem.h> |
|
23 |
|
24 /** |
|
25 * Execution context for Service UI. This class provides functionality to |
|
26 * execute the actual UI flow of this service. |
|
27 * |
|
28 * @since S60 3.1 |
|
29 */ |
|
30 class CPbkxRemoteContactLookupServiceUiContext : public CBase |
|
31 { |
|
32 |
|
33 public: |
|
34 |
|
35 /** Describes the mode in which the remote lookup is performed. */ |
|
36 enum TMode |
|
37 { |
|
38 /** Normal mode - all the common contact actions are available. |
|
39 Search query editor is displayed. |
|
40 */ |
|
41 EModeNormal, |
|
42 |
|
43 /* Like normal mode, but search query editor is not displayed. |
|
44 In this mode, search query text must be given. |
|
45 */ |
|
46 EModeExistingCriteria, |
|
47 |
|
48 /** Contact selector mode - remote lookup is used to select contact |
|
49 for the caller. |
|
50 Search query editor is displayed. |
|
51 */ |
|
52 EModeContactSelector |
|
53 }; |
|
54 |
|
55 class TResult |
|
56 { |
|
57 public: |
|
58 |
|
59 /** |
|
60 * Possible exit reasons. |
|
61 */ |
|
62 enum TExitReason |
|
63 { |
|
64 EExitUndefined, // Undefined exit reason. This should never be returned. |
|
65 EExitUserClosed, // User closed rcl without selecting anything. |
|
66 EExitContactSelected, // User selected contact and rcl was closed. |
|
67 EExitError, // RCL closed because of error. |
|
68 EExitApplication // User selected exit from menu. Also calling application |
|
69 // should exit when receiving this. |
|
70 }; |
|
71 |
|
72 TResult() : iSelectedContactItem( NULL), iExitReason( EExitUndefined ) {} |
|
73 |
|
74 /** |
|
75 * Selected contact item. |
|
76 */ |
|
77 CContactItem* iSelectedContactItem; |
|
78 |
|
79 /** |
|
80 * Exit reason. |
|
81 */ |
|
82 TExitReason iExitReason; |
|
83 }; |
|
84 |
|
85 /** |
|
86 * Execute remote lookup UI flow. |
|
87 * |
|
88 * @param aQueryText loose query text |
|
89 * @param aResult remote lookup results are populated here. |
|
90 */ |
|
91 virtual void ExecuteL( const TDesC& aQueryText, TResult& aResult ) = 0; |
|
92 }; |
|
93 |
|
94 #endif // CPBKXREMOTECONTACTLOOKUPSERVICEUICONTEXT_H |
|