50 |
50 |
51 #ifdef Q_MOC_RUN |
51 #ifdef Q_MOC_RUN |
52 # pragma Q_MOC_EXPAND_MACROS |
52 # pragma Q_MOC_EXPAND_MACROS |
53 #endif |
53 #endif |
54 |
54 |
55 QTM_BEGIN_NAMESPACE |
55 QT_BEGIN_NAMESPACE |
56 |
56 |
57 class QMediaService; |
57 class QMediaService; |
58 |
58 |
59 struct Q_MEDIA_EXPORT QMediaServiceProviderFactoryInterface : public QFactoryInterface |
59 struct Q_MEDIA_EXPORT QMediaServiceProviderFactoryInterface : public QFactoryInterface |
60 { |
60 { |
61 virtual QStringList keys() const = 0; |
61 virtual QStringList keys() const = 0; |
62 virtual QMediaService* create(QString const& key) = 0; |
62 virtual QMediaService* create(QString const& key) = 0; |
63 virtual void release(QMediaService *service) = 0; |
63 virtual void release(QMediaService *service) = 0; |
64 }; |
64 }; |
65 |
65 |
66 QTM_END_NAMESPACE |
|
67 |
|
68 #define QMediaServiceProviderFactoryInterface_iid \ |
66 #define QMediaServiceProviderFactoryInterface_iid \ |
69 "com.nokia.Qt.QMediaServiceProviderFactoryInterface/1.0" |
67 "com.nokia.Qt.QMediaServiceProviderFactoryInterface/1.0" |
70 QT_BEGIN_NAMESPACE |
68 Q_DECLARE_INTERFACE(QMediaServiceProviderFactoryInterface, QMediaServiceProviderFactoryInterface_iid) |
71 Q_DECLARE_INTERFACE(QtMobility::QMediaServiceProviderFactoryInterface, QMediaServiceProviderFactoryInterface_iid) |
|
72 QT_END_NAMESPACE |
|
73 |
69 |
74 QTM_BEGIN_NAMESPACE |
|
75 |
70 |
76 struct Q_MEDIA_EXPORT QMediaServiceSupportedFormatsInterface |
71 struct Q_MEDIA_EXPORT QMediaServiceSupportedFormatsInterface |
77 { |
72 { |
78 virtual ~QMediaServiceSupportedFormatsInterface() {} |
73 virtual ~QMediaServiceSupportedFormatsInterface() {} |
79 virtual QtMedia::SupportEstimate hasSupport(const QString &mimeType, const QStringList& codecs) const = 0; |
74 virtual QtMediaServices::SupportEstimate hasSupport(const QString &mimeType, const QStringList& codecs) const = 0; |
80 virtual QStringList supportedMimeTypes() const = 0; |
75 virtual QStringList supportedMimeTypes() const = 0; |
81 }; |
76 }; |
82 |
77 |
83 QTM_END_NAMESPACE |
|
84 |
|
85 #define QMediaServiceSupportedFormatsInterface_iid \ |
78 #define QMediaServiceSupportedFormatsInterface_iid \ |
86 "com.nokia.Qt.QMediaServiceSupportedFormatsInterface/1.0" |
79 "com.nokia.Qt.QMediaServiceSupportedFormatsInterface/1.0" |
87 QT_BEGIN_NAMESPACE |
80 Q_DECLARE_INTERFACE(QMediaServiceSupportedFormatsInterface, QMediaServiceSupportedFormatsInterface_iid) |
88 Q_DECLARE_INTERFACE(QtMobility::QMediaServiceSupportedFormatsInterface, QMediaServiceSupportedFormatsInterface_iid) |
|
89 QT_END_NAMESPACE |
|
90 |
81 |
91 QTM_BEGIN_NAMESPACE |
|
92 |
82 |
93 struct Q_MEDIA_EXPORT QMediaServiceSupportedDevicesInterface |
83 struct Q_MEDIA_EXPORT QMediaServiceSupportedDevicesInterface |
94 { |
84 { |
95 virtual ~QMediaServiceSupportedDevicesInterface() {} |
85 virtual ~QMediaServiceSupportedDevicesInterface() {} |
96 virtual QList<QByteArray> devices(const QByteArray &service) const = 0; |
86 virtual QList<QByteArray> devices(const QByteArray &service) const = 0; |
97 virtual QString deviceDescription(const QByteArray &service, const QByteArray &device) = 0; |
87 virtual QString deviceDescription(const QByteArray &service, const QByteArray &device) = 0; |
98 }; |
88 }; |
99 |
89 |
100 QTM_END_NAMESPACE |
|
101 |
|
102 #define QMediaServiceSupportedDevicesInterface_iid \ |
90 #define QMediaServiceSupportedDevicesInterface_iid \ |
103 "com.nokia.Qt.QMediaServiceSupportedDevicesInterface/1.0" |
91 "com.nokia.Qt.QMediaServiceSupportedDevicesInterface/1.0" |
104 QT_BEGIN_NAMESPACE |
92 Q_DECLARE_INTERFACE(QMediaServiceSupportedDevicesInterface, QMediaServiceSupportedDevicesInterface_iid) |
105 Q_DECLARE_INTERFACE(QtMobility::QMediaServiceSupportedDevicesInterface, QMediaServiceSupportedDevicesInterface_iid) |
|
106 QT_END_NAMESPACE |
|
107 |
93 |
108 QTM_BEGIN_NAMESPACE |
94 |
109 |
95 |
110 struct Q_MEDIA_EXPORT QMediaServiceFeaturesInterface |
96 struct Q_MEDIA_EXPORT QMediaServiceFeaturesInterface |
111 { |
97 { |
112 virtual ~QMediaServiceFeaturesInterface() {} |
98 virtual ~QMediaServiceFeaturesInterface() {} |
113 virtual QMediaServiceProviderHint::Features supportedFeatures(const QByteArray &service) const = 0; |
99 virtual QMediaServiceProviderHint::Features supportedFeatures(const QByteArray &service) const = 0; |
114 }; |
100 }; |
115 |
101 |
116 QTM_END_NAMESPACE |
|
117 |
|
118 //MOC doesn't recognire paramitized macros |
|
119 #define QMediaServiceFeaturesInterface_iid \ |
102 #define QMediaServiceFeaturesInterface_iid \ |
120 "com.nokia.Qt.QMediaServiceFeaturesInterface/1.0" |
103 "com.nokia.Qt.QMediaServiceFeaturesInterface/1.0" |
121 QT_BEGIN_NAMESPACE |
104 Q_DECLARE_INTERFACE(QMediaServiceFeaturesInterface, QMediaServiceFeaturesInterface_iid) |
122 Q_DECLARE_INTERFACE(QtMobility::QMediaServiceFeaturesInterface, QMediaServiceFeaturesInterface_iid) |
|
123 QT_END_NAMESPACE |
|
124 |
105 |
125 QTM_BEGIN_NAMESPACE |
|
126 |
106 |
127 class Q_MEDIA_EXPORT QMediaServiceProviderPlugin : public QObject, public QMediaServiceProviderFactoryInterface |
107 class Q_MEDIA_EXPORT QMediaServiceProviderPlugin : public QObject, public QMediaServiceProviderFactoryInterface |
128 { |
108 { |
129 Q_OBJECT |
109 Q_OBJECT |
130 Q_INTERFACES(QtMobility::QMediaServiceProviderFactoryInterface:QFactoryInterface) |
110 Q_INTERFACES(QMediaServiceProviderFactoryInterface:QFactoryInterface) |
131 |
111 |
132 public: |
112 public: |
133 virtual QStringList keys() const = 0; |
113 virtual QStringList keys() const = 0; |
134 virtual QMediaService* create(const QString& key) = 0; |
114 virtual QMediaService* create(const QString& key) = 0; |
135 virtual void release(QMediaService *service) = 0; |
115 virtual void release(QMediaService *service) = 0; |
136 }; |
116 }; |
137 |
117 |
138 QTM_END_NAMESPACE |
118 QT_END_NAMESPACE |
139 |
119 |
140 |
120 |
141 #endif // QMEDIASERVICEPROVIDERPLUGIN_H |
121 #endif // QMEDIASERVICEPROVIDERPLUGIN_H |