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

📄 dialup.tex

📁 很牛的GUI源码wxWidgets-2.8.0.zip 可在多种平台下运行.
💻 TEX
字号:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Name:        dialup.tex%% Purpose:     wxDialUpManager documentation%% Author:      Vadim Zeitlin%% Modified by:%% Created:     08.04.00%% RCS-ID:      $Id: dialup.tex,v 1.7 2005/02/22 15:09:48 ABX Exp $%% Copyright:   (c) Vadim Zeitlin%% License:     wxWindows license%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\section{\class{wxDialUpManager}}\label{wxdialupmanager}This class encapsulates functions dealing with verifying the connection statusof the workstation (connected to the Internet via a direct connection,connected through a modem or not connected at all) and to establish thisconnection if possible/required (i.e. in the case of the modem).The program may also wish to be notified about the change in the connectionstatus (for example, to perform some action when the user connects to thenetwork the next time or, on the contrary, to stop receiving data from the netwhen the user hangs up the modem). For this, you need to use one of the eventmacros described below.This class is different from other wxWidgets classes in that there is at mostone instance of this class in the program accessed via \helpref{wxDialUpManager::Create()}{wxdialupmanagercreate} and you can'tcreate the objects of this class directly.\wxheading{Derived from}No base class\wxheading{Include files}<wx/dialup.h>\wxheading{Event table macros}To be notified about the change in the network connection status, use theseevent handler macros to direct input to member functions that take a \helpref{wxDialUpEvent}{wxdialupevent} argument.\twocolwidtha{7cm}\begin{twocollist}\itemsep=0pt\twocolitem{{\bf EVT\_DIALUP\_CONNECTED(func)}}{A connection with the network was established.}\twocolitem{{\bf EVT\_DIALUP\_DISCONNECTED(func)}}{The connection with the network was lost.}\end{twocollist}%\wxheading{See also}\helpref{dialup sample}{sampledialup}\\\helpref{wxDialUpEvent}{wxdialupevent}\latexignore{\rtfignore{\wxheading{Members}}}\membersection{wxDialUpManager::Create}\label{wxdialupmanagercreate}\func{wxDialUpManager*}{Create}{\void}This function should create and return the object of the platform-specificclass derived from wxDialUpManager. You should delete the pointer when you aredone with it.\membersection{wxDialUpManager::IsOk}\label{wxdialupmanagerisok}\constfunc{bool}{IsOk}{\void}Returns {\tt true} if the dialup manager was initialized correctly. If thisfunction returns {\tt false}, no other functions will work neither, so it is agood idea to call this function and check its result before calling any otherwxDialUpManager methods\membersection{wxDialUpManager::\destruct{wxDialUpManager}}\label{wxdialupmanagerdtor}\func{}{\destruct{wxDialUpManager}}{\void}Destructor.\membersection{wxDialUpManager::GetISPNames}\label{wxdialupmanagergetispnames}\constfunc{size\_t}{GetISPNames}{\param{wxArrayString\& }{names}}This function is only implemented under Windows.Fills the array with the names of all possible values for the firstparameter to \helpref{Dial()}{wxdialupmanagerdial} on this machine and returnstheir number (may be $0$).\membersection{wxDialUpManager::Dial}\label{wxdialupmanagerdial}\func{bool}{Dial}{\param{const wxString\& }{nameOfISP = wxEmptyString}, \param{const wxString\& }{username = wxEmptyString}, \param{const wxString\& }{password = wxEmptyString}, \param{bool }{async = true}}Dial the given ISP, use {\it username} and {\it password} to authenticate.The parameters are only used under Windows currently, for Unix you should use \helpref{SetConnectCommand}{wxdialupmanagersetconnectcommand} to customize thisfunctions behaviour.If no {\it nameOfISP} is given, the function will select the default one(proposing the user to choose among all connections defined on this machine)and if no username and/or password are given, the function will try to dowithout them, but will ask the user if really needed.If {\it async} parameter is {\tt false}, the function waits until the end of dialingand returns {\tt true} upon successful completion.If {\it async} is {\tt true}, the function only initiates the connection andreturns immediately - the result is reported via events (an event is sentanyhow, but if dialing failed it will be a DISCONNECTED one).\membersection{wxDialUpManager::IsDialing}\label{wxdialupmanagerisdialing}\constfunc{bool}{IsDialing}{\void}Returns true if (async) dialing is in progress.\wxheading{See also}\helpref{Dial}{wxdialupmanagerdial}\membersection{wxDialUpManager::CancelDialing}\label{wxdialupmanagercanceldialing}\func{bool}{CancelDialing}{\void}Cancel dialing the number initiated with \helpref{Dial}{wxdialupmanagerdial} with async parameter equal to {\tt true}.Note that this won't result in DISCONNECTED event being sent.\wxheading{See also}\helpref{IsDialing}{wxdialupmanagerisdialing}\membersection{wxDialUpManager::HangUp}\label{wxdialupmanagerhangup}\func{bool}{HangUp}{\void}Hang up the currently active dial up connection.\membersection{wxDialUpManager::IsAlwaysOnline}\label{wxdialupmanagerisalwaysonline}\constfunc{bool}{IsAlwaysOnline}{\void}Returns {\tt true} if the computer has a permanent network connection (i.e. ison a LAN) and so there is no need to use Dial() function to go online.{\bf NB:} this functions tries to guess the result and it is not alwaysguaranteed to be correct, so it is better to ask user forconfirmation or give him a possibility to override it.\membersection{wxDialUpManager::IsOnline}\label{wxdialupmanagerisonline}\constfunc{bool}{IsOnline}{\void}Returns {\tt true} if the computer is connected to the network: under Windows,this just means that a RAS connection exists, under Unix we check thatthe "well-known host" (as specified by \helpref{SetWellKnownHost}{wxdialupmanagersetwellknownhost}) is reachable.\membersection{wxDialUpManager::SetOnlineStatus}\label{wxdialupmanagersetonlinestatus}\func{void}{SetOnlineStatus}{\param{bool }{isOnline = true}}Sometimes the built-in logic for determining the online status may fail,so, in general, the user should be allowed to override it. This functionallows to forcefully set the online status - whatever our internalalgorithm may think about it.\wxheading{See also}\helpref{IsOnline}{wxdialupmanagerisonline}\membersection{wxDialUpManager::EnableAutoCheckOnlineStatus}\label{wxdialupmanagerenableautocheckonlinestatus}\func{bool}{EnableAutoCheckOnlineStatus}{\param{size\_t }{nSeconds = 60}}Enable automatic checks for the connection status and sending of {\tt wxEVT\_DIALUP\_CONNECTED/wxEVT\_DIALUP\_DISCONNECTED} events. The intervalparameter is only for Unix where we do the check manually and specifies howoften should we repeat the check (each minute by default). Under Windows, thenotification about the change of connection status is sent by the system and sowe don't do any polling and this parameter is ignored.Returns {\tt false} if couldn't set up automatic check for online status.\membersection{wxDialUpManager::DisableAutoCheckOnlineStatus}\label{wxdialupmanagerdisableautocheckonlinestatus}\func{void}{DisableAutoCheckOnlineStatus}{\void}Disable automatic check for connection status change - notice that the{\tt wxEVT\_DIALUP\_XXX} events won't be sent any more neither.\membersection{wxDialUpManager::SetWellKnownHost}\label{wxdialupmanagersetwellknownhost}\func{void}{SetWellKnownHost}{\param{const wxString\& }{hostname}, \param{int }{portno = 80}}This method is for Unix only.Under Unix, the value of well-known host is used to check whether we'reconnected to the internet. It is unused under Windows, but this functionis always safe to call. The default value is {\tt www.yahoo.com:80}.\membersection{wxDialUpManager::SetConnectCommand}\label{wxdialupmanagersetconnectcommand}\func{void}{SetConnectCommand}{\param{const wxString\& }{commandDial = wxT("/usr/bin/pon")}, \param{const wxString\& }{commandHangup = wxT("/usr/bin/poff")}}This method is for Unix only.Sets the commands to start up the network and to hang up again.\wxheading{See also}\helpref{Dial}{wxdialupmanagerdial}

⌨️ 快捷键说明

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