|
1 /* |
|
2 * Copyright (c) 2005 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: GS engine interface. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef GS_ENGINE_INTERFACE_H |
|
20 #define GS_ENGINE_INTERFACE_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 |
|
25 /** |
|
26 * Interface to GS engine. Provides functions for creating, deleting, getting |
|
27 * and setting settings data. Supported data types are Tint, Treal, TDesC8 and |
|
28 * TDesC16. |
|
29 */ |
|
30 class MGSEngine |
|
31 { |
|
32 public: |
|
33 |
|
34 virtual void MGSEngine() = 0; |
|
35 |
|
36 /** |
|
37 * Adds an observer. Does not take the ownership of the observer. The |
|
38 * observer will get notification whenever the observed data is changed. |
|
39 */ |
|
40 virtual void AddObserverL(MGSEngineObserver* aObserver, TUnt32 aObservedId) = 0; |
|
41 |
|
42 /** |
|
43 * Removes an observer. |
|
44 */ |
|
45 virtual void RemoveObserver(MGSEngineObserver* aObserver) = 0; |
|
46 |
|
47 virtual TInt Create(TUint32 aId, TInt aVal) = 0; |
|
48 virtual TInt Create(TUint32 aId, const TReal& aVal) = 0; |
|
49 virtual TInt Create(TUint32 aId, const TDesC8& aVal) = 0; |
|
50 virtual TInt Create(TUint32 aId, const TDesC16& aVal) = 0; |
|
51 |
|
52 virtual TInt Delete(TUint32 aId) = 0; |
|
53 |
|
54 virtual TInt Get(TUint32 aId, TInt& aVal) = 0; |
|
55 virtual TInt Set(TUint32 aId, TInt aVal) = 0; |
|
56 |
|
57 virtual TInt Get(TUint32 aId, TReal& aVal) = 0; |
|
58 virtual TInt Set(TUint32 aId, const TReal& aVal) = 0; |
|
59 |
|
60 virtual TInt Get(TUint32 aId, TDes8& aVal) = 0; |
|
61 virtual TInt Set(TUint32 aId, const TDesC8& aVal) = 0; |
|
62 |
|
63 virtual TInt Get(TUint32 aId, TDes16& aVal) = 0; |
|
64 virtual TInt Set(TUint32 aId, const TDesC16& aVal) = 0; |
|
65 |
|
66 |
|
67 }; |
|
68 |
|
69 /** |
|
70 * Observer for GS engine. |
|
71 */ |
|
72 class MGSEngineObserver |
|
73 { |
|
74 virtual void ValueChanged(TUint32 aId) = 0; |
|
75 }; |
|
76 |
|
77 #endif //GS_ENGINE_INTERFACE_H |
|
78 |
|
79 // End of File |