qatchat_p.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. /****************************************************************************
  2. **
  3. ** This file is part of the Qt Extended Opensource Package.
  4. **
  5. ** Copyright (C) 2009 Trolltech ASA.
  6. **
  7. ** Contact: Qt Extended Information (info@qtextended.org)
  8. **
  9. ** This file may be used under the terms of the GNU General Public License
  10. ** version 2.0 as published by the Free Software Foundation and appearing
  11. ** in the file LICENSE.GPL included in the packaging of this file.
  12. **
  13. ** Please review the following information to ensure GNU General Public
  14. ** Licensing requirements will be met:
  15. ** http://www.fsf.org/licensing/licenses/info/GPLv2.html.
  16. **
  17. **
  18. ****************************************************************************/
  19. #ifndef QATCHAT_P_H
  20. #define QATCHAT_P_H
  21. //
  22. // W A R N I N G
  23. // -------------
  24. //
  25. // This file is not part of the Qt Extended API. It exists purely as an
  26. // implementation detail. This header file may change from version to
  27. // version without notice, or even be removed.
  28. //
  29. // We mean it.
  30. //
  31. #include "qatresult.h"
  32. #include <qobject.h>
  33. #include <qstring.h>
  34. #include <qbytearray.h>
  35. class QAtChatCommandPrivate;
  36. class QAtChatCommand : public QObject
  37. {
  38. Q_OBJECT
  39. friend class QAtChat;
  40. friend class QAtChatPrivate;
  41. public:
  42. QAtChatCommand( const QString& command, QAtResult::UserData *data );
  43. QAtChatCommand( const QString& command, const QByteArray& pdu,
  44. QAtResult::UserData *data );
  45. ~QAtChatCommand();
  46. signals:
  47. void done( bool ok, const QAtResult& result );
  48. private:
  49. QAtChatCommandPrivate *d;
  50. void emitDone();
  51. };
  52. class QAtChatLineRequest : public QObject
  53. {
  54. Q_OBJECT
  55. public:
  56. QAtChatLineRequest( QObject *target, const char *slot )
  57. {
  58. connect( this, SIGNAL(line(QString)), target, slot );
  59. }
  60. ~QAtChatLineRequest() {}
  61. void sendLine( const QString& value ) { emit line( value ); }
  62. signals:
  63. void line( const QString& value );
  64. };
  65. #endif