/* ============================================================
 * File  : sink.h
 * Author: Colin Guthrie <kde@colin.guthr.ie>
 * Date  : 2007-01-22
 *
 * Copyright 2007 Colin Guthrie <kde@colin.guthr.ie>
 *
 * This program is free software; you can redistribute it
 * and/or modify it under the terms of the GNU General
 * Public License as published by the Free Software Foundation;
 * either version 2, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * ============================================================ */

#ifndef SINK_H
#define SINK_H

#include <tqstring.h>
#include "libkipi2/interface.h"

#include <tdeconfig.h>

namespace KIPI2
{
class Collection;
} 

namespace KIPISyncPlugin
{

// Foreard definition
/// @todo Convert this to an Interface/Factory type setup.
class Sink : public KIPI2::Interface
{
public:
  Sink(unsigned int sinkId, TQString name, TDEConfig* pConfig, TDEWallet::Wallet* pWallet);

  unsigned int SinkId();

  /// The Name of the Sink as chosen by the user.
  TQString Name();
  
  /// An internal, unique type as specified by the sink.
  virtual TQString Type() = 0;
  
  /// Some information about the sink type for the benefit of the user.
  virtual TQString TypeDescription() = 0;
  
  virtual const KIPI2::CollectionList* getCollections() = 0;

  virtual void Save(TDEConfig* pConfig, TDEWallet::Wallet* pWallet) = 0;
  
  // As some Sinks are remote, we have the concept of connect/disconnect
  virtual bool Connect() { return true; };
  
  virtual void Disconnect() { };
  
  //virtual void asTQListViewItem(TQListView* pParent) = 0;

protected:

  unsigned int mSinkId;
  TQString mName;


};

// Play at creating a sink (this will be removed)
class Sink2 : Sink
{
public:
  Sink2(unsigned int sinkId, TQString name, TDEConfig* pConfig, TDEWallet::Wallet* pWallet);
  TQString Type();
  TQString TypeDescription();
  KIPI2::CollectionList* getCollections();
  void Save(TDEConfig* pConfig, TDEWallet::Wallet* pWallet);
};


}
#endif /* SINK_H */
