|
1 /* |
|
2 * Copyright (c) 2002-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: Defines midlet handler class for document handler. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CDOCMIDLETHANDLER_H |
|
20 #define CDOCMIDLETHANDLER_H |
|
21 |
|
22 // INCLUDES |
|
23 #include "DocDefaultHandler.h" |
|
24 |
|
25 // FORWARD DECLARATIONS |
|
26 |
|
27 // CONSTANS |
|
28 |
|
29 // CLASS DECLARATION |
|
30 |
|
31 /** |
|
32 * This class is Java Midlet handler for midlets which do support |
|
33 * CDMA Sprint extensions to Application Management System (AMS). |
|
34 * |
|
35 */ |
|
36 NONSHARABLE_CLASS(CDocMidletHandler) : public CDocDefaultHandler |
|
37 { |
|
38 |
|
39 public: // Constructors and destructor |
|
40 |
|
41 /** |
|
42 * Two-phased constructor. |
|
43 * |
|
44 * @param aDataType Data type |
|
45 * @param aUid UID of the handler app |
|
46 * @param aDocDispatcher Pointer to DocumentHandler instance |
|
47 * |
|
48 * @return Constructed CDocMidletHandler |
|
49 */ |
|
50 static CDocMidletHandler* NewL( |
|
51 const TDataType& aDataType, |
|
52 const TUid& aUid, |
|
53 CDocumentHandler* aDocDispatcher ); |
|
54 |
|
55 /** |
|
56 * Two-phased constructor. |
|
57 * |
|
58 * @param aDataType Data type |
|
59 * @param aUid UID of the handler app |
|
60 * @param aDocDispatcher Pointer to DocumentHandler instance |
|
61 * |
|
62 * @return Constructed CMidletHandler |
|
63 */ |
|
64 static CDocMidletHandler* NewLC( |
|
65 const TDataType& aDataType, |
|
66 const TUid& aUid, |
|
67 CDocumentHandler* aDocDispatcher ); |
|
68 |
|
69 /** |
|
70 * Destructor |
|
71 */ |
|
72 ~CDocMidletHandler(); |
|
73 |
|
74 public: // New functions |
|
75 |
|
76 /** |
|
77 * Method for checking if given UID belongs to a Java Midlet. |
|
78 * |
|
79 * @param aUid UID of some app |
|
80 * |
|
81 * @return ETrue if given UID belongs to a midlet, |
|
82 * otherwise EFalse. |
|
83 */ |
|
84 static TBool IsMidlet(const TUid& aUid); |
|
85 |
|
86 public: // Functions from base classes |
|
87 |
|
88 /** |
|
89 * From CDefaultHandler OpenFileEmbedded(). Calls OpenFile() |
|
90 * because midlet is not embeddable. |
|
91 * @return An error code |
|
92 */ |
|
93 TInt OpenFileEmbeddedL(); |
|
94 |
|
95 /** |
|
96 * From CDefaultHandler OpenFile(). |
|
97 * Launches midlet normally and passes required parameter(s). |
|
98 * @return An error code |
|
99 */ |
|
100 TInt OpenFileL(); |
|
101 |
|
102 private: // New functions |
|
103 |
|
104 /** |
|
105 * Epoc constructor |
|
106 */ |
|
107 void ConstructL(); |
|
108 |
|
109 /** |
|
110 * Constructor |
|
111 * @param aDataType Data type |
|
112 * @param aUid UID of the handler app |
|
113 * @param aDocDispatcher Pointer to DocumentHandler instance |
|
114 */ |
|
115 CDocMidletHandler( |
|
116 const TDataType& aDataType, |
|
117 const TUid& aUid, |
|
118 CDocumentHandler* aDocDispatcher ); |
|
119 |
|
120 /** |
|
121 * C++ copy constructor |
|
122 |
|
123 */ |
|
124 CDocMidletHandler( const CDocMidletHandler& ); |
|
125 |
|
126 /** |
|
127 * Prohibit the assignment operation |
|
128 */ |
|
129 CDocMidletHandler operator=( const CDocMidletHandler& ) const; |
|
130 |
|
131 protected: |
|
132 |
|
133 private: // Data |
|
134 |
|
135 }; |
|
136 |
|
137 #endif // CDOCMIDLETHANDLER_H |
|
138 |
|
139 // End of File |