📄 kphone.h
字号:
#ifndef KPHONE_H_INCLUDED#define KPHONE_H_INCLUDED#include <qmainwindow.h>#include <sys/types.h>#include <sys/socket.h>#include <sys/un.h>#include <stdio.h>#include <unistd.h>#include <sys/stat.h>#include <fcntl.h>#include <stdio.h>#include <errno.h>class SipClient;class SipUser;class PhoneList;class SessionControl;class AudioControl;class VideoControl;class WbdControl;class ExtControl;class KSipUserInfo;class KPhoneView;class CallAudio;class KSipRegistrations;class KSipAuthentication;class KSipPreferences;class KSipOptions;class SipRegister;class KTestOptions;class TrayIcon;class IMControl;QString const KPhoneVersion = "1.0.2";int const quitTime = 5000;int const ringTime_1 = 200;int const ringTime_2 = 2000;int const ringTime_3 = 3000;int const acceptTime = 500;int const acceptSubscribeSendToSubscribe_time = 5000;int const constRegistrationExpiresTime = 240;int const constSubscribeExpiresTime = 600;int const constStunRequestPeriod = 1200;int const constMinPort = 8000;int const constMaxPort = 9000;int const constMinMPort = 10000;int const constMaxMPort = 11000;int const kphoneMaximumWidht = 480;int const kphoneMinimunWidht = 80;QString const constStunServer = "stunservername:XXXX";/***@short The Wrapper for the Graphic Representation* This class is the parent of the graphic representation of the call* It administrates the provisioning of the call and starts the Classes* SessionControl (Provisioning)* KphoneView (Parent of the graph. Representation and the session control)* SipClient (Parent of the SIP/SDP-Machine */class KPhone : public QMainWindow{ Q_OBJECTpublic: KPhone( unsigned int listenport, QString dhost, QString prefix, bool p2p, bool looseRoute, bool strictRoute, int debug ); ~KPhone( void ); void showUsers( void ); QString getUserPrefix( void ); void delRDialSocket(void);public slots: void showHelp( void ); void updateTrayIcon( void ); void toggleVisibility( void ); void trayMenuRequested( const QPoint& pos );private slots: void timerTick( void ); void stun_timerTick( void ); void rdTimerTick( void ); void showUserInfo( void ); void showAudioPreferences( void ); void showVideoPreferences( void ); void showExtPreferences1( void ); void showExtPreferences2( void ); void showExtPreferences3( void ); void showExtPreferences4( void ); void showRegistrations( void ); void showGlobalPreferences( void ); void showQueryOptions( void ); void showTestOptions( void ); void showAboutKPhone( void ); void toggleTrayIcon( int ); void kphoneQuit( void );protected: void closeEvent( QCloseEvent* ); void createTrayIcon( void ); void deleteTrayIcon( void ); CallAudio *callAudio; KPhoneView *view; TrayIcon *trayIcon; // Global state SipClient *client; SipUser *user; SessionControl *sessionC; QPopupMenu *preferencesMenu; // Dialogs PhoneList *qdial; KSipUserInfo *userinfo; AudioControl *audiocontrol; VideoControl *videocontrol; ExtControl *extcontrol1; ExtControl *extcontrol2; ExtControl *extcontrol3; ExtControl *extcontrol4; KSipRegistrations *registrations; KSipAuthentication *authentication; KSipPreferences *sipprefs; KSipOptions *queryoptions; KTestOptions *testoptions;private: QTimer *quitTimer; QTimer *timer; QString userPrefix;//RDial bool newRDialSocket(void); void checkRDialSocket(void); bool haveRDSock; struct sockaddr_un rdServer,rdClient; int rdSock; int rdLoop; char mess[100]; QTimer *rdTimer;};#endif // KPHONE_H_INCLUDED
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -