PSKlient.h 986 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #ifndef PSKlient_H
  2. #define PSKlient_H
  3. #include <Klient.h>
  4. #include <KSGTDatei.h>
  5. #include <Fortschritt.h>
  6. using namespace Network;
  7. using namespace Framework;
  8. class PSKlient
  9. {
  10. private:
  11. int id;
  12. Klient *klient;
  13. CRITICAL_SECTION cs;
  14. char *schlüssel;
  15. char schlüsselLän;
  16. bool verbunden;
  17. Text *fehler;
  18. int ref;
  19. public:
  20. // Konstruktor
  21. PSKlient();
  22. // Destruktor
  23. ~PSKlient();
  24. // nicht constant
  25. void lock();
  26. void unlock();
  27. bool verbinde();
  28. bool verbinde( int port, const char *ip );
  29. KSGTDatei *getDateiGruppenListe();
  30. KSGTDatei *getDateiListe( int gruppe );
  31. __int64 getDateiGröße( int gruppe, const char *pfad );
  32. bool downloadDatei( int gruppe, __int64 *start, const char *pfad, const char *zielPfad, FBalken *zFb, bool *abbruch, int maxbps );
  33. bool trenne( bool abmelden );
  34. // constant
  35. bool istVerbunden() const;
  36. bool istRegistriert() const;
  37. int getDownload() const;
  38. Text *zError() const;
  39. // Reference Counting
  40. PSKlient *getThis();
  41. PSKlient *release();
  42. };
  43. #endif