|
|
|
@ -22,7 +22,7 @@
|
|
|
|
|
#include <tqmap.h>
|
|
|
|
|
class TQListView;
|
|
|
|
|
class TDEConfig;
|
|
|
|
|
namespace KWallet
|
|
|
|
|
namespace TDEWallet
|
|
|
|
|
{
|
|
|
|
|
class Wallet;
|
|
|
|
|
}
|
|
|
|
@ -35,13 +35,13 @@ class Sink;
|
|
|
|
|
// Create a templated creator function to allow our "sinks" to
|
|
|
|
|
// register themselves with the factory.
|
|
|
|
|
template <class T>
|
|
|
|
|
Sink* SinkCreator(unsigned int sinkId, TQString name, TDEConfig* pConfig, KWallet::Wallet* pWallet)
|
|
|
|
|
Sink* SinkCreator(unsigned int sinkId, TQString name, TDEConfig* pConfig, TDEWallet::Wallet* pWallet)
|
|
|
|
|
{
|
|
|
|
|
return (Sink*) new T(sinkId, name, pConfig, pWallet);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Define a type that is a pointer to the templated function above.
|
|
|
|
|
typedef Sink* SinkProxy(unsigned int sinkId, TQString name, TDEConfig* pConfig, KWallet::Wallet* pWallet);
|
|
|
|
|
typedef Sink* SinkProxy(unsigned int sinkId, TQString name, TDEConfig* pConfig, TDEWallet::Wallet* pWallet);
|
|
|
|
|
|
|
|
|
|
// And define a type that is a Map of names to creator functions.
|
|
|
|
|
typedef TQMap<TQString, SinkProxy*> SinkMap;
|
|
|
|
@ -51,7 +51,7 @@ class SinkFactory
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
static bool Register(TQString name, SinkProxy* pSinkProxy);
|
|
|
|
|
static Sink* Create(TQString name, unsigned int sinkId, TQString name, TDEConfig* pConfig, KWallet::Wallet* pWallet);
|
|
|
|
|
static Sink* Create(TQString name, unsigned int sinkId, TQString name, TDEConfig* pConfig, TDEWallet::Wallet* pWallet);
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
static SinkMap mSinkProxies;
|
|
|
|
|