1 /** |
|
2 * Copyright (c) 2010 Sasken Communication Technologies Ltd. |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the "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 * Chandradeep Gandhi, Sasken Communication Technologies Ltd - Initial contribution |
|
11 * |
|
12 * Contributors: |
|
13 * Manasij Roy, Nalina Hariharan |
|
14 * |
|
15 * Description: |
|
16 * Interface for a base service provider |
|
17 * |
|
18 */ |
|
19 #include "smfprovider.h" |
|
20 |
|
21 SmfProvider::SmfProvider() |
|
22 { |
|
23 |
|
24 } |
|
25 SmfProvider::~SmfProvider() |
|
26 { |
|
27 |
|
28 } |
|
29 QString SmfProvider::serviceName() const |
|
30 { |
|
31 return m_serviceName; |
|
32 } |
|
33 QImage SmfProvider::serviceIcon() const |
|
34 { |
|
35 return m_serviceIcon; |
|
36 } |
|
37 QString SmfProvider::description() const |
|
38 { |
|
39 return m_description; |
|
40 } |
|
41 QUrl SmfProvider::serviceUrl() const |
|
42 { |
|
43 return m_serviceUrl; |
|
44 } |
|
45 QUrl SmfProvider::applicationUrl() const |
|
46 { |
|
47 return m_appUrl; |
|
48 } |
|
49 QList<QString> SmfProvider::supportedInterfaces() const |
|
50 { |
|
51 return m_serviceTypes; |
|
52 } |
|
53 /** |
|
54 * List of languages supported by this service provider |
|
55 * @return a QStringList of languages supported by this service |
|
56 * provider in 2 letter ISO 639-1 format. |
|
57 */ |
|
58 QStringList SmfProvider::supportedLanguages() const |
|
59 { |
|
60 return m_supportedLanguages; |
|
61 } |
|
62 void SmfProvider::setServiceName(QString& name) |
|
63 { |
|
64 m_serviceName = name; |
|
65 } |
|
66 void SmfProvider::setServiceIcon(QImage& image) |
|
67 { |
|
68 m_serviceIcon = image; |
|
69 } |
|
70 void SmfProvider::setDescription(QString& desc) |
|
71 { |
|
72 m_description = desc; |
|
73 } |
|
74 void SmfProvider::setServiceUrl(QUrl& url) |
|
75 { |
|
76 m_serviceUrl = url; |
|
77 } |
|
78 void SmfProvider::setApplicationUrl(QUrl& url) |
|
79 { |
|
80 m_appUrl = url; |
|
81 } |
|
82 void SmfProvider::setSupportedInterfaces( QStringList& types) |
|
83 { |
|
84 m_serviceTypes = types; |
|
85 } |
|
86 /** |
|
87 * Sets the list of languages supported by this service provider |
|
88 * @param lang A QStringList of languages supported by this service |
|
89 * provider in 2 letter ISO 639-1 format. |
|
90 */ |
|
91 void SmfProvider::setSupportedLanguages( QStringList& lang ) |
|
92 { |
|
93 m_supportedLanguages = lang; |
|
94 } |
|
95 |
|
96 QDataStream &operator<<(QDataStream& out, const SmfProvider& base) |
|
97 { |
|
98 out<<base.m_serviceName; |
|
99 out<<base.m_serviceIcon; |
|
100 out<<base.m_description; |
|
101 out<<base.m_serviceUrl; |
|
102 out<<base.m_appUrl; |
|
103 return out; |
|
104 } |
|
105 QDataStream &operator>>(QDataStream& in, SmfProvider& base) |
|
106 { |
|
107 in>>base.m_serviceName; |
|
108 in>>base.m_serviceIcon; |
|
109 in>>base.m_description; |
|
110 in>>base.m_serviceUrl; |
|
111 in>>base.m_appUrl; |
|
112 return in; |
|
113 } |
|