williamr@4
|
1 |
/*
|
williamr@4
|
2 |
* Copyright (c) 2004-2007 Nokia Corporation and/or its subsidiary(-ies).
|
williamr@4
|
3 |
* All rights reserved.
|
williamr@4
|
4 |
* This component and the accompanying materials are made available
|
williamr@4
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
williamr@4
|
6 |
* which accompanies this distribution, and is available
|
williamr@4
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
williamr@4
|
8 |
*
|
williamr@4
|
9 |
* Initial Contributors:
|
williamr@4
|
10 |
* Nokia Corporation - initial contribution.
|
williamr@4
|
11 |
*
|
williamr@4
|
12 |
* Contributors:
|
williamr@4
|
13 |
*
|
williamr@4
|
14 |
* Description: Data types for the view definition
|
williamr@4
|
15 |
*
|
williamr@4
|
16 |
*/
|
williamr@4
|
17 |
|
williamr@4
|
18 |
|
williamr@4
|
19 |
#ifndef VPBKCONTACTVIEW_HRH
|
williamr@4
|
20 |
#define VPBKCONTACTVIEW_HRH
|
williamr@4
|
21 |
|
williamr@4
|
22 |
/**
|
williamr@4
|
23 |
* Default view id value for view definition.
|
williamr@4
|
24 |
*/
|
williamr@4
|
25 |
#define KVPbkDefaultViewId -1
|
williamr@4
|
26 |
|
williamr@4
|
27 |
/**
|
williamr@4
|
28 |
* Sort policy types for the contact view definition.
|
williamr@4
|
29 |
*/
|
williamr@4
|
30 |
enum TVPbkContactViewSortPolicy
|
williamr@4
|
31 |
{
|
williamr@4
|
32 |
/// Use this together with EVPbkCompositeView if the subviews must
|
williamr@4
|
33 |
/// be showed in order i.e. show all contacts from subView1 and after
|
williamr@4
|
34 |
/// that all contacts from subView2
|
williamr@4
|
35 |
EVPbkOrderedContactView = 0,
|
williamr@4
|
36 |
/// Leaf views are usually always sorted. If this is used together
|
williamr@4
|
37 |
/// with EVPbkCompositeView then the composite merges contacts from
|
williamr@4
|
38 |
/// sorted subviews.
|
williamr@4
|
39 |
EVPbkSortedContactView,
|
williamr@4
|
40 |
/// Used to create an unsorted view which means that contacts are
|
williamr@4
|
41 |
/// showed in the order they have been saved in the store. Not all stores
|
williamr@4
|
42 |
/// support this type. You can never use this in EVPbkCompositeView type
|
williamr@4
|
43 |
/// of view. You can not use this in a subview of the composite view whose
|
williamr@4
|
44 |
/// policy is EVPbkSortedContactView.
|
williamr@4
|
45 |
EVPbkUnsortedContactView
|
williamr@4
|
46 |
};
|
williamr@4
|
47 |
|
williamr@4
|
48 |
/**
|
williamr@4
|
49 |
* Contact view types for the contact view definition.
|
williamr@4
|
50 |
*/
|
williamr@4
|
51 |
enum TVPbkContactViewType
|
williamr@4
|
52 |
{
|
williamr@4
|
53 |
/// Type for the contact leaf view. There is zero subviews.
|
williamr@4
|
54 |
EVPbkContactsView,
|
williamr@4
|
55 |
/// Type for the group leaf view. There is zero subviews.
|
williamr@4
|
56 |
EVPbkGroupsView,
|
williamr@4
|
57 |
/// Type for the folding view. Folding view definition
|
williamr@4
|
58 |
/// should usually have one subview definition that is used
|
williamr@4
|
59 |
/// to create a view when folding view is expanded.
|
williamr@4
|
60 |
EVPbkFoldingView,
|
williamr@4
|
61 |
/// Use this type if the view can have several subviews. If
|
williamr@4
|
62 |
/// there is no subviews then it's interpreted as a placeholder.
|
williamr@4
|
63 |
EVPbkCompositeView
|
williamr@4
|
64 |
};
|
williamr@4
|
65 |
|
williamr@4
|
66 |
/**
|
williamr@4
|
67 |
* Defines the sharing of the contact view.
|
williamr@4
|
68 |
*
|
williamr@4
|
69 |
* A store can have a server that shares the same view for multiple clients
|
williamr@4
|
70 |
* for saving resources. On the other hand the view can be created only
|
williamr@4
|
71 |
* for one client's purpose e.g using a special sort order and in this case
|
williamr@4
|
72 |
* the view is a local view.
|
williamr@4
|
73 |
*/
|
williamr@4
|
74 |
enum TVPbkContactViewSharing
|
williamr@4
|
75 |
{
|
williamr@4
|
76 |
/// Default value for VPBK_CONTACT_VIEW definition viewSharing.
|
williamr@4
|
77 |
/// Don't set this for CVPbkContactViewDefinition.
|
williamr@4
|
78 |
EVPbkViewSharingUndefined,
|
williamr@4
|
79 |
/// Inform store that is should create a handle to shared view
|
williamr@4
|
80 |
/// that can be used by multiple clients.
|
williamr@4
|
81 |
EVPbkSharedView,
|
williamr@4
|
82 |
/// Inform store that it should create a local view that
|
williamr@4
|
83 |
/// is only used by single client.
|
williamr@4
|
84 |
EVPbkLocalView
|
williamr@4
|
85 |
};
|
williamr@4
|
86 |
|
williamr@4
|
87 |
/**
|
williamr@4
|
88 |
* Contact view flags for the contact view definition.
|
williamr@4
|
89 |
*/
|
williamr@4
|
90 |
enum TVPbkContactViewFlag
|
williamr@4
|
91 |
{
|
williamr@4
|
92 |
/// No flags
|
williamr@4
|
93 |
EVPbkContactViewFlagsNone = 0x00000000,
|
williamr@4
|
94 |
EVPbkExcludeEmptyGroups = 0x00000001
|
williamr@4
|
95 |
};
|
williamr@4
|
96 |
|
williamr@4
|
97 |
/**
|
williamr@4
|
98 |
* In the following filter list the supported contact view filters
|
williamr@4
|
99 |
* are defined.
|
williamr@4
|
100 |
*
|
williamr@4
|
101 |
* Some stores support native and fast filtering for certain filters but
|
williamr@4
|
102 |
* part of the filters can cause performance problems with large contact
|
williamr@4
|
103 |
* number.
|
williamr@4
|
104 |
* E.g. Contacts Model store has optimized filters for:
|
williamr@4
|
105 |
* -EVPbkContactViewFilterEmail
|
williamr@4
|
106 |
* -EVPbkContactViewFilterPhoneNumber
|
williamr@4
|
107 |
* -EVPbkContactViewFilterMobileNumber
|
williamr@4
|
108 |
* -EVPbkContactViewFilterFaxNumber
|
williamr@4
|
109 |
* -EVPbkContactViewFilterRingingTone
|
williamr@4
|
110 |
*
|
williamr@4
|
111 |
* The filters can be combined by using the VPbkContactViewFilterBuilder
|
williamr@4
|
112 |
* services. The combined filter ORs the filters; the returned contacts
|
williamr@4
|
113 |
* match to at least one of the filters.
|
williamr@4
|
114 |
*
|
williamr@4
|
115 |
* @see VPbkContactViewFilterBuilder
|
williamr@4
|
116 |
*/
|
williamr@4
|
117 |
enum TVPbkContactViewFilter
|
williamr@4
|
118 |
{
|
williamr@4
|
119 |
/// The view is unfiltered; it includes all the contacts
|
williamr@4
|
120 |
EVPbkContactViewFilterNone = 0,
|
williamr@4
|
121 |
/// The filter includes items that have an email address
|
williamr@4
|
122 |
EVPbkContactViewFilterEmail = 1,
|
williamr@4
|
123 |
/// The filter includes items that have a phone number
|
williamr@4
|
124 |
/// (the definition of phone number includes general/mobile/etc. number)
|
williamr@4
|
125 |
EVPbkContactViewFilterPhoneNumber,
|
williamr@4
|
126 |
/// The filter includes items that have a mobile phone number
|
williamr@4
|
127 |
EVPbkContactViewFilterMobileNumber,
|
williamr@4
|
128 |
/// The filter includes items that have a fax number
|
williamr@4
|
129 |
EVPbkContactViewFilterFaxNumber,
|
williamr@4
|
130 |
/// The filter includes items that have a ringing tone defined
|
williamr@4
|
131 |
EVPbkContactViewFilterRingingTone,
|
williamr@4
|
132 |
/// The filter includes items that have a video number
|
williamr@4
|
133 |
EVPbkContactViewFilterVideoNumber = 1000,
|
williamr@4
|
134 |
/// The filter includes items that have a pager number
|
williamr@4
|
135 |
EVPbkContactViewFilterPagerNumber,
|
williamr@4
|
136 |
/// The filter includes items that have a DTMF field
|
williamr@4
|
137 |
EVPbkContactViewFilterDTMF,
|
williamr@4
|
138 |
/// The filter includes items that have a VoIP number
|
williamr@4
|
139 |
EVPbkContactViewFilterVoIP,
|
williamr@4
|
140 |
/// The filter includes items that are TopContact
|
williamr@4
|
141 |
EVPbkContactViewFilterTopContact
|
williamr@4
|
142 |
};
|
williamr@4
|
143 |
|
williamr@4
|
144 |
/**
|
williamr@4
|
145 |
* The version of the contact view definition version structure
|
williamr@4
|
146 |
*/
|
williamr@4
|
147 |
enum TVPbkContactViewVersion
|
williamr@4
|
148 |
{
|
williamr@4
|
149 |
EVPbkContactViewV1 = 1,
|
williamr@4
|
150 |
EVPbkContactViewV2,
|
williamr@4
|
151 |
EVPbkContactViewV3
|
williamr@4
|
152 |
};
|
williamr@4
|
153 |
|
williamr@4
|
154 |
#endif // VPBKCONTACTVIEW_HRH
|
williamr@4
|
155 |
|
williamr@4
|
156 |
// End of File
|