TDE personal information management applications
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

tdeio_mobile.h 2.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /* This file is part of the KDE mobile library.
  2. Copyright (C) 2004 Helge Deller <deller@kde.org>
  3. This library is free software; you can redistribute it and/or
  4. modify it under the terms of the GNU Library General Public
  5. License version 2 as published by the Free Software Foundation.
  6. This library is distributed in the hope that it will be useful,
  7. but WITHOUT ANY WARRANTY; without even the implied warranty of
  8. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  9. Library General Public License for more details.
  10. You should have received a copy of the GNU Library General Public License
  11. along with this library; see the file COPYING.LIB. If not, write to
  12. the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  13. Boston, MA 02110-1301, USA.
  14. */
  15. #ifndef __TDEIO_MOBILE_H__
  16. #define __TDEIO_MOBILE_H__
  17. #include <tqstring.h>
  18. #include <tqvaluelist.h>
  19. #include <tdeio/slavebase.h>
  20. #include <kmobiledevice.h>
  21. #include <kmobileclient.h>
  22. class KMobileProtocol : public TDEIO::SlaveBase
  23. {
  24. public:
  25. KMobileProtocol( const TQCString &pool, const TQCString &app );
  26. ~KMobileProtocol();
  27. void get( const KURL& url );
  28. void stat( const KURL& url );
  29. void mimetype( const KURL& url );
  30. void listDir( const KURL& url );
  31. protected:
  32. int getDeviceAndRessource(const TQString &_path,
  33. TQString &devName, TQString &resource, TQString &devPath,
  34. KMobileDevice::Capabilities &devCaps);
  35. TQString folderMimeType(int cap);
  36. TQString entryMimeType(int cap);
  37. void listRoot(const KURL& url);
  38. void listTopDeviceDir(const TQString &devName);
  39. void listEntries(const TQString &devName,
  40. const TQString &resource, const TQString &devPath,
  41. const KMobileDevice::Capabilities devCaps);
  42. void listAddressBook(const TQString &devName, const TQString &resource);
  43. int getVCard( const TQString &devName, TQCString &result, TQString &mime, const TQString &path );
  44. void listCalendar(const TQString &devName, const TQString &resource);
  45. int getCalendar( const TQString &devName, TQCString &result, TQString &mime, const TQString &path );
  46. void listNotes(const TQString &devName, const TQString &resource);
  47. int getNote( const TQString &devName, TQCString &result, TQString &mime, const TQString &path );
  48. void listFileStorage(const TQString &devName, const TQString &resource, const TQString &devPath);
  49. int getFileStorage( const TQString &devName, TQCString &result, TQString &mime, const TQString &path );
  50. private:
  51. KMobileClient m_dev;
  52. };
  53. #endif