|
1 /* |
|
2 * Copyright (c) 2005-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: Phonebook 2 ringing commands. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef PBK2RINGTONECOMMANDS_H |
|
20 #define PBK2RINGTONECOMMANDS_H |
|
21 |
|
22 // FORWARD DECLARATIONS |
|
23 class MPbk2BaseCommand; |
|
24 class MVPbkStoreContact; |
|
25 class MVPbkStoreContactField; |
|
26 class MVPbkFieldType; |
|
27 |
|
28 /** |
|
29 * Phonebook 2 ringtone commands are used to change contact ringtone field and |
|
30 * operate on a locked store contact. |
|
31 * All commands that return a MPbk2BaseCommand* handle may run asynchronously. |
|
32 * The handle should be deleted to cancel the running command. |
|
33 * |
|
34 * NOTE: Some command functions may return NULL, it is a valid value and means |
|
35 * that command run synchronously. |
|
36 */ |
|
37 class Pbk2RingtoneCommands |
|
38 { |
|
39 public: |
|
40 |
|
41 /** |
|
42 * Assigns a ringtone to a contact. |
|
43 * |
|
44 * Runs select ringtone dialog and assign selected ringtone file |
|
45 * to the contact. If the contact already has a ringtone, it will |
|
46 * be preselected in the ringtone dialog. If default ringtone is |
|
47 * selected, ringtone field will be set empty. |
|
48 * |
|
49 * @param aContact Locked store contact. |
|
50 |
|
51 * @return A command handle. |
|
52 */ |
|
53 static MPbk2BaseCommand* SetRingtoneL(MVPbkStoreContact* aContact); |
|
54 |
|
55 /** |
|
56 * Removes a ringtone. |
|
57 * |
|
58 * Runs a confirmation dialog and set ringtone field empty. |
|
59 * |
|
60 * @param aContact Locked store contact. |
|
61 * |
|
62 * @return A command handle. |
|
63 */ |
|
64 static MPbk2BaseCommand* RemoveRingtoneL(MVPbkStoreContact* aContact); |
|
65 |
|
66 /** |
|
67 * Returns ETrue if aField is a ringtone field. |
|
68 * |
|
69 * @param aField Store contact field. |
|
70 * |
|
71 * @return ETrue if aField is a ringtone field, EFalse otherwise |
|
72 */ |
|
73 static TBool IsRingtoneFieldL(const MVPbkStoreContactField& aField); |
|
74 |
|
75 /** |
|
76 * Returns ETrue if the ringtone field points to a valid ringtone file. |
|
77 * |
|
78 * @param aField Store contact field. |
|
79 * |
|
80 * @return ETrue if aField contains a valid ringtone filed, EFalse otherwise |
|
81 */ |
|
82 static TBool IsRingtoneFieldValidL(const MVPbkStoreContactField& aField); |
|
83 }; |
|
84 |
|
85 #endif // PBK2SETTONEBASE_H |
|
86 |
|
87 // End of File |