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

📄 kphoneview.h

📁 KphoneSI (kpsi) is a SIP (Session Initiation Protocol) user agent for Linux, with which you can in
💻 H
字号:
#ifndef KPHONEVIEW_H_INCLUDED#define KPHONEVIEW_H_INCLUDED#include <qwidget.h>#include <qptrdict.h>#include <qvbox.h>#include <qradiobutton.h>#include <qxml.h>#include <qcombobox.h>#include "../dissipate2/sipuri.h"#include "ksipauthentication.h"#include "kcallwidget.h"#include "kcallview.h"#include "callaudio.h"#define  UPDATEWLIST 1#define  CLEARSOCKETS 2typedef QPtrListIterator<KCallWidget> widgetIterator;class SipClient;class SipUser;class SipCall;class SipCallMember;class KCallWidget;class CallAudio;class KInstantMessageWidget;class QListViewItem;class SessionControl;class KPhone;class KSipRegistrations;class KSipAuthentication;class ContactsListView;class KCallView;class IncomingCall;/*** @short parses the XML coded contact infos in NOTIFY*/class ContactParser : public QXmlDefaultHandler{public:	ContactParser( void );	bool startDocument();	bool startElement( const QString&, const QString&, const QString&, const QXmlAttributes& );	bool endElement( const QString&, const QString&, const QString& );	QStringList getListContacts( void ) { return contacts; }private:	QStringList contacts;};/*** @short Graphic representation of the Kphone** Graphic representation of the Kphone.* It provides the user with an interface to call provisioning and call setup.* It is the anchorpoint for all Call Widgets* Outgoing Calls are started here, after the User raises an appropriate signal* Incoming Calls are started here, after SipCall calls the meth. KPhoneView::incomingCall* KPhoneView is the anchorpoint for all Call Widgets*/class KPhoneView : public QWidget{	Q_OBJECTpublic:	enum State { ONLINE, OFFLINE };	KPhoneView( SessionControl *sessioncontrol, SipClient *c, SipUser *u, CallAudio *au, QWidget *parent = 0, const char *name = 0, bool p2p = false );	~KPhoneView( void );		void info(void);	void switchCall( SipCall *call );	void updateIdentity( SipUser *newUser, SipRegister *newReg = 0 );	void identities( KSipRegistrations *i );		void startCWbyContact(SipCall::CallType ct);	bool startCallWidget (QString num, SipCall::CallType ct);/** * Run over all CallWidgets and kill all markes for killing */	void updateContacts( QString file );	void setContactsOffline( void );	void setContactsOnline( void );	void kphoneQuit( void );/** * Run over all CallWidgets and inform us*/	void testWidgetList( void);	/** * is Widget No wNr still there?*/	int isExistingWidget( int wNr );/*** Run over all SipCalls and inform about CallType and PayLoad*/	void rideCalls( void);		int cntWidget(void) { return ++widgetCounter;}/*** Run over all SipCalls and count payload calls not onHold*/	int countActiveCalls(void);/***	Check if we are the only (INVITE initiated) call*/	bool activateAllowed( void);	bool getState( void );	widgetIterator  getWList(void)      const {return  widgetIterator ( cwList); }signals:	void stateChanged(void);	void auditKCW(void);public slots:	void makeNewCall( void );	void makeNewExt1( void );	void makeNewExt2( void );	void makeNewExt3( void );	void makeNewExt4( void );	void makeVideoCall( void );	void makeAuViCall( void );/***	do the action according to info */			void informPhoneView( int info, int wNr);/***	redirect a call */		void redirectCall( const SipUri &calluri, const QString &subject, int ct, KCallWidget *trfrom , int wNr);	void showIdentities( void );	void localStatusUpdate( void );	void stateUpdated( int id );	void updateSubscribes( void );	void terminateSubscribes( int mess, SipCall *call );private slots:	void incomingInstantMessage( SipMessage *message );	void incomingSubscribe( SipCallMember *member, bool sendSubscribe );	void incomingCall( SipCall *call, QString body );	void hideCallWidget( SipCall *call );	void contactDoubleClicked( QListViewItem *i );		void listDoubleClicked( QListViewItem *i );	void hangupCW(void);	void toggleCW(void);	void holdCW(void);	void renegCodecCW();//	void stransferCW(void);	void referCW(void);	void transferCW(void);		void busyToggled( bool onoff );	void contactSendMessage();//methods for pulldowns and pops	void contactCall( void );	void contactExt1( void );	void contactExt2( void );	void contactExt3( void );	void contactExt4( void );	void contactVideoCall( void );	void contactAuViCall( void );	void showPhoneBook( void );	void buttonOffOnlineClicked( void );	void buttonUpdateClicked( void );protected:	SipClient *client;	SipUser *user;	CallAudio *callAudio;	ContactsListView *clist;	KCallView *tlist;	int callcount;	QLineEdit   *lineeditCall;	QPushButton *buttonSipUri;	QPushButton *buttonNewExt1;	QPushButton *buttonNewExt2;	QPushButton *buttonNewExt3;	QPushButton *buttonNewExt4;	QPushButton *buttonPhone;	QPushButton *buttonNewCall;	QPushButton *buttonVideoCall;	QPushButton *buttonAuViCall;	QLabel *labelSipUri;	QLabel *labelFullname;	KPhone *kphone;	KSipRegistrations *identitiesDialog;	KSipAuthentication *sipauthentication;	private:	void sendNotify( int id, SipCallMember *member = 0 );	QString getUserPrefix( void );	void saveRejectContactList( void );	QPtrList<KCallWidget> cwList;	QPtrList<KInstantMessageWidget> imwList;	QStringList rejectedContactList;	void saveContacts( void );	void addContactToPhoneBook( SipCallMember *member );	SipRegister *reg;	QPushButton *buttonOffOnline;	QPushButton *buttonUpdate;	QComboBox *stateComboBox;	int atomId;	QTimer *subscribeTimer;	int subscribeExpiresTime;	SessionControl *sessionControl;	bool isOnline;	bool buttonSetOffline;	bool setSubscribeOffline;	void updateWidgetList( void );	QString stateText( QString text );	int widgetCounter;	QLabel *infostat1;	SipClient *sic;	bool pointtopoint;};#endif // KPHONEVIEW_H_INCLUDED

⌨️ 快捷键说明

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