⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qt-ikstransport-private.h

📁 symbina上可以使用一个xml解析器,对开发网络应用很有好处
💻 H
字号:
/* ikstransport implementation using QT** Copyright (C) 2004-2005 Darrell Karbott (djk2005@users.sf.net)** This code is free software; you can redistribute it and/or** modify it under the terms of the GNU Public Licence (GPL) version 2** See http://www.gnu.org/ for further details of the GPL.*/#ifndef __QT_IKS_TRANSPORT_PRIVATE__#define __QT_IKS_TRANSPORT_PRIVATE__#include <sys/types.h>#include <stdio.h>#include <qsocket.h>#include <qcstring.h>#include <iksemel.h>#include "qt-ikstransport.h"class NotifyOnDelete;/*  Private helper class that hooks a QSocket  into the iksemel library using the ikstransport  interfaces.  NOTE: I have to break this out into        a seperate header so that I        can run the moc over it.*/class QTIkstransportInstance : public QObject {private:  Q_OBJECT ;public:  // Static hook functions used to fill in the ikstransport struct.  static int IksTConnectAsync(iksparser *prs, void **socketptr,                               const char *server,                               const char *server_name,                               int port,                               void *notify_data,                               iksAsyncNotify *notify_func);  static void IksTClose(void *socket);  static int IksTSend(void *socket, const char *data, size_t len);  static int IksTRecv(void *socket, char *buffer, size_t buf_len, int timeout);public slots:  void hostFound ();  void connected ();  void connectionClosed ();  void delayedCloseFinished ();  void readyRead ();  void bytesWritten ( int nbytes );  void error ( int );protected:    QTIkstransportInstance(iksparser *prs, const char *server, const char *server_name,                         int port, void *notify_data, iksAsyncNotify *notify_func);  // Finishes constructing the instance.  int iksTConnectAsync(void **socketptr);  void startDeferredDelete();  ~QTIkstransportInstance();  int iksTSend(const char *data, size_t len);  int iksTRecv(char *buffer, size_t buf_len, int timeout);  // Returns true if the instance was deleted during the call.  bool notify(int reason, int data0 = 0, int data1 = 0);private:  iksparser* mpParser;  QSocket* mpSocket;  bool mIgnoreNotifications;  QCString mServer;  QCString mServerName;  int mPort;  void* mNotifyData;  iksAsyncNotify* mpfNotifyFunc;  // Used by notify() to figure out when the instance has  // been deleted out from under it.  NotifyOnDelete* mpDeletionNotifier;};#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -