1 /* |
|
2 * Copyright (c) 2002 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: This is base interface for all controls. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CMMACONTROL_H |
|
20 #define CMMACONTROL_H |
|
21 |
|
22 // INCLUDES |
|
23 // #include <mevents.h> |
|
24 // #include <jutils.h> |
|
25 #include "mmapiutils.h" |
|
26 // CLASS DECLARATION |
|
27 /** |
|
28 * This is base interface for all controls. |
|
29 * |
|
30 * |
|
31 */ |
|
32 class CMMAControl : public CBase |
|
33 { |
|
34 public: |
|
35 /** |
|
36 * Static getter for Java class name. Java object will be created |
|
37 * according to this name. Derived classes defines the class names. |
|
38 * |
|
39 * @see ClassName |
|
40 * @param aControl Control to use. |
|
41 * @return Java control class name. |
|
42 */ |
|
43 static const TDesC* ClassNameJni(CMMAControl* aControl); |
|
44 |
|
45 /** |
|
46 * Sets associated Java object. |
|
47 * |
|
48 * @param aControl Control to use. |
|
49 * @param aControlObject Java side control object. |
|
50 */ |
|
51 static void StaticSetHandle(CMMAControl* aControl, |
|
52 jobject aControlObject); |
|
53 public: |
|
54 /** |
|
55 * @see ClassNameJni |
|
56 * @return Java control class name. |
|
57 */ |
|
58 virtual const TDesC& ClassName() const = 0; |
|
59 |
|
60 /** |
|
61 * Return public class name. |
|
62 */ |
|
63 IMPORT_C virtual const TDesC& PublicClassName() const; |
|
64 |
|
65 /** |
|
66 * Refresh this control. |
|
67 */ |
|
68 virtual void RefreshControl() |
|
69 { |
|
70 // do nothing |
|
71 } |
|
72 |
|
73 private: |
|
74 /** |
|
75 * @see StaticSetHandle |
|
76 * @param aControlObject Java side control object. |
|
77 */ |
|
78 void SetHandle(jobject aControlObject); |
|
79 |
|
80 protected: |
|
81 /** |
|
82 * Java side control object. |
|
83 */ |
|
84 jobject iControlObject; |
|
85 }; |
|
86 |
|
87 #endif // CMMACONTROL_H |
|