|
1 // Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // apaid.h - Application capabilities. |
|
15 // |
|
16 /** |
|
17 * @file apaid.h |
|
18 * |
|
19 * @internalComponent |
|
20 * @released |
|
21 */ |
|
22 |
|
23 #ifndef __APAID_H__ |
|
24 #define __APAID_H__ |
|
25 #include<iostream> |
|
26 #include<vector> |
|
27 #include "commontypes.h" |
|
28 using namespace std; |
|
29 #include "apmstd.h" // class TDataTypeWithPriority |
|
30 #include "uidtype.h" |
|
31 |
|
32 class TAppCapability |
|
33 { |
|
34 public: |
|
35 /** Defines an application's support for embeddability. */ |
|
36 enum TEmbeddability { |
|
37 /** An application cannot be embedded. */ |
|
38 ENotEmbeddable=0, |
|
39 /** An application can be run embedded or standalone and can read/write embedded document-content. */ |
|
40 EEmbeddable=1, |
|
41 /** An application can only be run embedded and can read/write embedded document-content. */ |
|
42 EEmbeddableOnly=2, |
|
43 /** An application can be run embedded or standalone and cannot read/write embedded document-content. */ |
|
44 EEmbeddableUiOrStandAlone=5, |
|
45 /** An application can only be run embedded and cannot read/write embedded document-content. */ |
|
46 EEmbeddableUiNotStandAlone=6 }; |
|
47 /** Defines an application's attributes as a set of bit flags. */ |
|
48 enum TCapabilityAttribute |
|
49 { |
|
50 /** This functionality is deprecated from v9.5 onwards. |
|
51 @deprecated |
|
52 */ |
|
53 EBuiltAsDll = 0x00000001, |
|
54 /** If set, the application provides control panel functionality. */ |
|
55 EControlPanelItem = 0x00000002, |
|
56 /** If set, the application is not a native executable, and hence the "path" and "extension" (as well as the "name") must be provided in the app_file field of the APP_REGISTRATION_INFO resource. */ |
|
57 ENonNative = 0x00000004 |
|
58 }; |
|
59 public: |
|
60 /** Indicates the extent to which the application can be embedded. */ |
|
61 TEmbeddability iEmbeddability; |
|
62 /** Indicates whether the application is document-based and supports being asked |
|
63 to create a new file. */ |
|
64 TUint iSupportsNewFile; |
|
65 /** Indicates whether the existence of the application should be advertised to the |
|
66 user. If this is set to ETrue, the application does not appear on the Extras |
|
67 Bar (or equivalent). */ |
|
68 TUint iAppIsHidden; // not shown in the Shell etc. |
|
69 /** Allows the application to be launched in the foreground (when set to EFalse) |
|
70 or in the background (when set to ETrue). */ |
|
71 TUint iLaunchInBackground; // Series 60 extension to allow apps to be launched in the background |
|
72 /** Stores the application's logical group name. */ |
|
73 TAppGroupName iGroupName; // Series 60 extension to allow apps to be categorized according a logical group name, e.g. 'games' |
|
74 |
|
75 /** Indicates the application attributes. One or more values from TCapabilityAttribute may be specified. */ |
|
76 TUint iAttributes; |
|
77 private: |
|
78 // expandable class - add new members to the end, add them to the end of int/ext also, and increment the version no. |
|
79 // default value for all data members must be 0 |
|
80 enum { EVersion=4 }; |
|
81 private: |
|
82 TInt iTAppCapability_Reserved1; |
|
83 }; |
|
84 |
|
85 |
|
86 /** Application service information. |
|
87 |
|
88 Encapsulates a service UID and associated opaque data. |
|
89 |
|
90 An instance of this class provides information about |
|
91 a specific implementation of the service identified by |
|
92 the encapsulated service UID. |
|
93 |
|
94 @publishedPartner |
|
95 @released |
|
96 */ |
|
97 |
|
98 class TAppServiceInfo |
|
99 { |
|
100 public: |
|
101 TAppServiceInfo(); |
|
102 ~TAppServiceInfo(); |
|
103 TAppServiceInfo(TUid aUid, std::vector<TDataTypeWithPriority*> aDataTypes); |
|
104 void Release(); |
|
105 TUid GetUid(); |
|
106 std::vector<TDataTypeWithPriority*> GetDataType(); |
|
107 |
|
108 private: |
|
109 TUid iUid; |
|
110 std::vector<TDataTypeWithPriority*> iDataTypes; |
|
111 TInt iTAppServiceInfo; |
|
112 }; |
|
113 |
|
114 #endif |