summaryrefslogtreecommitdiff
authoralwin <alwin>2005-03-16 11:15:08 (UTC)
committer alwin <alwin>2005-03-16 11:15:08 (UTC)
commitf366c924a105ad41e974af959b23b0d30c603234 (patch) (unidiff)
tree52c6f7e67add698a7fd296b76318dc2fba040139
parent954092e015c34ea0848f41d8acb7b957b12d6384 (diff)
downloadopie-f366c924a105ad41e974af959b23b0d30c603234.zip
opie-f366c924a105ad41e974af959b23b0d30c603234.tar.gz
opie-f366c924a105ad41e974af959b23b0d30c603234.tar.bz2
sorry, guys, checked in wrong files
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/ui/oholidayplugin.h8
-rw-r--r--libopie2/opiepim/ui/oholidaypluginif.h9
2 files changed, 8 insertions, 9 deletions
diff --git a/libopie2/opiepim/ui/oholidayplugin.h b/libopie2/opiepim/ui/oholidayplugin.h
index f4958c8..50dfe13 100644
--- a/libopie2/opiepim/ui/oholidayplugin.h
+++ b/libopie2/opiepim/ui/oholidayplugin.h
@@ -1,24 +1,24 @@
1#ifndef _HOLIDAY_PLUGIN_H 1#ifndef _HOLIDAY_PLUGIN_H
2#define _HOLIDAY_PLUGIN_H 2#define _HOLIDAY_PLUGIN_H
3 3
4namespace Opie {
5namespace Datebook {
6
7#include <qstring.h> 4#include <qstring.h>
8#include <qstringlist.h> 5#include <qstringlist.h>
9#include <qdate.h> 6#include <qdatetime.h>
7
8namespace Opie {
9namespace Datebook {
10 10
11class HolidayPlugin 11class HolidayPlugin
12{ 12{
13public: 13public:
14 HolidayPlugin(){}; 14 HolidayPlugin(){};
15 virtual ~HolidayPlugin(){}; 15 virtual ~HolidayPlugin(){};
16 virtual QString description()=0; 16 virtual QString description()=0;
17 virtual QStringList entries(const QDate&)=0; 17 virtual QStringList entries(const QDate&)=0;
18 virtual QStringList entries(unsigned year, unsigned month, unsigned day)=0; 18 virtual QStringList entries(unsigned year, unsigned month, unsigned day)=0;
19}; 19};
20 20
21} 21}
22} 22}
23#endif 23#endif
24 24
diff --git a/libopie2/opiepim/ui/oholidaypluginif.h b/libopie2/opiepim/ui/oholidaypluginif.h
index 6d36f08..874e5a3 100644
--- a/libopie2/opiepim/ui/oholidaypluginif.h
+++ b/libopie2/opiepim/ui/oholidaypluginif.h
@@ -1,64 +1,63 @@
1#ifndef _O_HOLIDAY_PLUGIN_IF_H 1#ifndef _O_HOLIDAY_PLUGIN_IF_H
2#define _O_HOLIDAY_PLUGIN_IF_H 2#define _O_HOLIDAY_PLUGIN_IF_H
3
4#include <opie2/odebug.h> 3#include <opie2/odebug.h>
5
6#include <qpe/qcom.h> 4#include <qpe/qcom.h>
5#include <qpe/quuid.h>
7 6
8#ifndef QT_NO_COMPONENT 7#ifndef QT_NO_COMPONENT
9//"b981b4e9-6d5d-4ee0-a193-f8d0e443809b" 8//"b981b4e9-6d5d-4ee0-a193-f8d0e443809b"
10#define IID_HOLIDAY_PLUGIN QUuid(0xb981b4e9, 0x6d5d, 0x4ee0 0xa1, 0x93,0xf8, 0xd0, 0xe4, 0x43, 0x80, 0x9b) 9#define IID_HOLIDAY_PLUGIN QUuid( 0xb981b4e9, 0x6d5d, 0x4ee0, 0xa1, 0x93,0xf8, 0xd0, 0xe4, 0x43, 0x80, 0x9b)
11#endif 10#endif
12 11
13namespace Opie { 12namespace Opie {
14namespace Datebook { 13namespace Datebook {
15 14
16class HolidayPlugin; 15class HolidayPlugin;
17 16
18class HolidayPluginIf:public QUnknownInterface 17class HolidayPluginIf:public QUnknownInterface
19{ 18{
20public: 19public:
21 HolidayPluginIf():QUnknownInterface(){} 20 HolidayPluginIf():QUnknownInterface(){}
22 virtual ~HolidayPluginIf(){} 21 virtual ~HolidayPluginIf(){}
23 22
24 virtual HolidayPlugin*plugin()=0; 23 virtual HolidayPlugin*plugin()=0;
25}; 24};
26 25
27template<class T>HolidayPluginWrapper:public HolidayPluginIf 26template<class T> class HolidayPluginWrapper:public HolidayPluginIf
28{ 27{
29public: 28public:
30 HolidayPluginWrapper():HolidayPluginIf(),_plugin(0){} 29 HolidayPluginWrapper():HolidayPluginIf(),_plugin(0){}
31 virtual ~HolidayPluginWrapper(){if (_plugin) delete _plugin;} 30 virtual ~HolidayPluginWrapper(){if (_plugin) delete _plugin;}
32 31
33 QRESULT queryInterface( const QUuid& uuid, QUnknownInterface** iface ) { 32 QRESULT queryInterface( const QUuid& uuid, QUnknownInterface** iface ) {
34 odebug << "HolidayPluginWrapper::queryInterface()" << oendl; 33 odebug << "HolidayPluginWrapper::queryInterface()" << oendl;
35 *iface = 0; 34 *iface = 0;
36 if (uuid==IID_HOLIDAY_PLUGIN||uuid==IID_QUnknown) { 35 if (uuid == IID_HOLIDAY_PLUGIN || uuid == IID_QUnknown) {
37 *iface = this; 36 *iface = this;
38 } else { 37 } else {
39 return QS_FALSE; 38 return QS_FALSE;
40 } 39 }
41 if (*iface) *iface->addRef(); 40 if (*iface) *iface->addRef();
42 return QS_OK; 41 return QS_OK;
43 } 42 }
44 43
45 // from qcom 44 // from qcom
46 Q_REFCOUNT 45 Q_REFCOUNT
47 46
48 virtual T*plugin() { 47 virtual T*plugin() {
49 if (!_plugin) {_plugin = new T();} 48 if (!_plugin) {_plugin = new T();}
50 return _plugin; 49 return _plugin;
51 } 50 }
52protected: 51protected:
53 T*_plugin; 52 T*_plugin;
54}; 53};
55 54
56#define EXPORT_HOLIDAY_PLUGIN( Plugin ) \ 55#define EXPORT_HOLIDAY_PLUGIN( Plugin ) \
57 Q_EXPORT_INTERFACE() { \ 56 Q_EXPORT_INTERFACE() { \
58 Q_CREATE_INSTANCE( Opie::Datebook::HolidayPluginWrapper<Plugin> ) \ 57 Q_CREATE_INSTANCE( Opie::Datebook::HolidayPluginWrapper<Plugin> ) \
59 } 58 }
60 59
61} 60}
62} 61}
63#endif 62#endif
64 63