?? qt-ikstransport-private.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 + -