1 /* |
|
2 * Copyright (c) 2009 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: HsRuntime provider interface. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef HSIRUNTIMEPROVIDER_H |
|
20 #define HSIRUNTIMEPROVIDER_H |
|
21 |
|
22 #include <QtPlugin> |
|
23 #include <QList> |
|
24 #include <QString> |
|
25 |
|
26 /*! |
|
27 \class HsRuntimeToken |
|
28 \ingroup group_hsruntimemodel |
|
29 \brief Represents a home screen runtime that can be created. |
|
30 |
|
31 Home screen runtimes are located in runtime providers. Each provider |
|
32 exposes its contained runtimes as runtime tokens. A token has all |
|
33 the needed information for runtime selection and creation |
|
34 |
|
35 */ |
|
36 class HsRuntimeToken |
|
37 { |
|
38 |
|
39 public: |
|
40 |
|
41 /*! |
|
42 The name of the library/plugin that contains the runtime. |
|
43 */ |
|
44 QString mLibrary; |
|
45 |
|
46 /*! |
|
47 Uniquely identifies the runtime. |
|
48 */ |
|
49 QString mUri; |
|
50 |
|
51 }; |
|
52 |
|
53 class HsRuntime; |
|
54 |
|
55 /*! |
|
56 \class IHsRuntimeProvider |
|
57 \ingroup group_hsruntimemodel |
|
58 \brief Defines a mechanism for retrieving a home screen runtime. |
|
59 Interface that defines a mechanism for retrieving a home screen |
|
60 runtime. Each home screen runtime provider implements this interface. |
|
61 |
|
62 */ |
|
63 class IHsRuntimeProvider |
|
64 { |
|
65 |
|
66 public: |
|
67 |
|
68 /*! |
|
69 Destructor. |
|
70 */ |
|
71 virtual ~IHsRuntimeProvider() {} |
|
72 |
|
73 public: |
|
74 |
|
75 /*! |
|
76 Returns contained runtimes as a list of runtime tokens. |
|
77 */ |
|
78 virtual QList<HsRuntimeToken> runtimes() = 0; |
|
79 |
|
80 /*! |
|
81 Creates and returns a runtime based on the given token. |
|
82 |
|
83 \a aToken Identifies the runtime to be created. |
|
84 |
|
85 Returns The created runtime or null in failure cases. |
|
86 */ |
|
87 virtual HsRuntime* createRuntime(const HsRuntimeToken& aToken) = 0; |
|
88 |
|
89 }; |
|
90 |
|
91 Q_DECLARE_INTERFACE(IHsRuntimeProvider, "com.nokia.homescreen.iruntimeprovider/1.0") |
|
92 |
|
93 #endif |
|