|
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: CCPSApi DLL source |
|
15 * |
|
16 */ |
|
17 |
|
18 // Include Files |
|
19 |
|
20 #include "hswidgetpublisher.h" |
|
21 #include "hswidgetpublisherimpl.h" |
|
22 #include "hswidget.h" |
|
23 |
|
24 |
|
25 // Member Functions |
|
26 |
|
27 using namespace Hs; |
|
28 // --------------------------------------------------------------------------- |
|
29 // |
|
30 // --------------------------------------------------------------------------- |
|
31 // |
|
32 EXPORT_C HsWidgetPublisher::HsWidgetPublisher( IHsDataObserver* aDataObserver): |
|
33 mImpl( new HsWidgetPublisherImpl() ) |
|
34 { |
|
35 mImpl->SetDataObserver( aDataObserver ); |
|
36 } |
|
37 |
|
38 // --------------------------------------------------------------------------- |
|
39 // |
|
40 // --------------------------------------------------------------------------- |
|
41 // |
|
42 EXPORT_C HsWidgetPublisher::~HsWidgetPublisher() |
|
43 { |
|
44 } |
|
45 |
|
46 // --------------------------------------------------------------------------- |
|
47 // |
|
48 // --------------------------------------------------------------------------- |
|
49 // |
|
50 EXPORT_C void HsWidgetPublisher::publishHsWidget( HsWidget& aTemplate ) |
|
51 { |
|
52 mImpl->PublishWidget( aTemplate ); |
|
53 } |
|
54 |
|
55 // --------------------------------------------------------------------------- |
|
56 // |
|
57 // --------------------------------------------------------------------------- |
|
58 // |
|
59 EXPORT_C HsWidget& HsWidgetPublisher::createHsWidgetWithDesc( |
|
60 std::string aTemplateName, std::string aWidgetName, |
|
61 std::string aIdentifier, std::string aDescription, |
|
62 std::string aIconLocation ) |
|
63 { |
|
64 return mImpl->CreateWidget( aTemplateName, aWidgetName, aIdentifier, |
|
65 aDescription, aIconLocation ); |
|
66 } |
|
67 |
|
68 // --------------------------------------------------------------------------- |
|
69 // |
|
70 // --------------------------------------------------------------------------- |
|
71 // |
|
72 EXPORT_C HsWidget& HsWidgetPublisher::createHsWidget( std::string aTemplateName, |
|
73 std::string aWidgetName, |
|
74 std::string aIdentifier ) |
|
75 { |
|
76 std::string emptyString(""); |
|
77 return mImpl->CreateWidget( aTemplateName, aWidgetName, aIdentifier, |
|
78 emptyString, emptyString ); |
|
79 } |
|
80 |
|
81 // --------------------------------------------------------------------------- |
|
82 // |
|
83 // --------------------------------------------------------------------------- |
|
84 // |
|
85 EXPORT_C void HsWidgetPublisher::removeHsWidget( std::string aTemplateName, |
|
86 std::string aWidgetName, |
|
87 std::string aIdentifier ) |
|
88 { |
|
89 mImpl->RemoveWidget( aTemplateName, aWidgetName, aIdentifier ); |
|
90 } |
|
91 |
|
92 // --------------------------------------------------------------------------- |
|
93 // |
|
94 // --------------------------------------------------------------------------- |
|
95 // |
|
96 EXPORT_C HsWidget& HsWidgetPublisher::getHsWidget( |
|
97 std::string aTemplateName, |
|
98 std::string aWidgetName, |
|
99 std::string aIdentifier ) |
|
100 { |
|
101 return mImpl->GetWidget( aTemplateName, aWidgetName, aIdentifier ); |
|
102 } |