diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 2003-02-12 09:58:33 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 2003-02-12 09:58:33 (GMT) |
commit | 7aeba45b84c7131f39f1f0ad00942c77e28112a3 (patch) | |
tree | c2d9de5193163648a01d30d5426dde66dc4b6f14 /Doc/mac/libctb.tex | |
parent | 90975f1ff930cc9464288c0af5989074687cb8c7 (diff) | |
download | cpython-7aeba45b84c7131f39f1f0ad00942c77e28112a3.zip cpython-7aeba45b84c7131f39f1f0ad00942c77e28112a3.tar.gz cpython-7aeba45b84c7131f39f1f0ad00942c77e28112a3.tar.bz2 |
Updated the Mac documentation to the current state of affairs.
Diffstat (limited to 'Doc/mac/libctb.tex')
-rw-r--r-- | Doc/mac/libctb.tex | 159 |
1 files changed, 0 insertions, 159 deletions
diff --git a/Doc/mac/libctb.tex b/Doc/mac/libctb.tex deleted file mode 100644 index 337ca0f..0000000 --- a/Doc/mac/libctb.tex +++ /dev/null @@ -1,159 +0,0 @@ -\section{\module{ctb} --- - Interface to the Communications Tool Box} - -\declaremodule{builtin}{ctb} - \platform{Mac} -\modulesynopsis{Interfaces to the Communications Tool Box. Only the - Connection Manager is supported.} - - -This module provides a partial interface to the Macintosh -Communications Toolbox. Currently, only Connection Manager tools are -supported. - -This module is only available under MacOS9 or earlier, in classic PPC -MacPython. -\index{Communications Toolbox, Macintosh} -\index{Macintosh Communications Toolbox} -\index{Connection Manager} - -\begin{datadesc}{error} -The exception raised on errors. -\end{datadesc} - -\begin{datadesc}{cmData} -\dataline{cmCntl} -\dataline{cmAttn} -Flags for the \var{channel} argument of the \method{Read()} and -\method{Write()} methods. -\end{datadesc} - -\begin{datadesc}{cmFlagsEOM} -End-of-message flag for \method{Read()} and \method{Write()}. -\end{datadesc} - -\begin{datadesc}{choose*} -Values returned by \method{Choose()}. -\end{datadesc} - -\begin{datadesc}{cmStatus*} -Bits in the status as returned by \method{Status()}. -\end{datadesc} - -\begin{funcdesc}{available}{} -Return \code{1} if the Communication Toolbox is available, zero otherwise. -\end{funcdesc} - -\begin{funcdesc}{CMNew}{name, sizes} -Create a connection object using the connection tool named -\var{name}. \var{sizes} is a 6-tuple given buffer sizes for data in, -data out, control in, control out, attention in and attention out. -Alternatively, passing \code{None} for \var{sizes} will result in -default buffer sizes. -\end{funcdesc} - - -\subsection{Connection Objects \label{connection-object}} - -For all connection methods that take a \var{timeout} argument, a value -of \code{-1} is indefinite, meaning that the command runs to completion. - -\begin{memberdesc}[connection]{callback} -If this member is set to a value other than \code{None} it should point -to a function accepting a single argument (the connection -object). This will make all connection object methods work -asynchronously, with the callback routine being called upon -completion. - -\note{For reasons beyond my understanding, the callback routine -is currently never called. You are advised against using asynchronous -calls for the time being.} -\end{memberdesc} - - -\begin{methoddesc}[connection]{Open}{timeout} -Open an outgoing connection, waiting at most \var{timeout} seconds for -the connection to be established. -\end{methoddesc} - -\begin{methoddesc}[connection]{Listen}{timeout} -Wait for an incoming connection. Stop waiting after \var{timeout} -seconds. This call is only meaningful to some tools. -\end{methoddesc} - -\begin{methoddesc}[connection]{accept}{yesno} -Accept (when \var{yesno} is non-zero) or reject an incoming call after -\method{Listen()} returned. -\end{methoddesc} - -\begin{methoddesc}[connection]{Close}{timeout, now} -Close a connection. When \var{now} is zero, the close is orderly -(outstanding output is flushed, etc.)\ with a timeout of -\var{timeout} seconds. When \var{now} is non-zero the close is -immediate, discarding output. -\end{methoddesc} - -\begin{methoddesc}[connection]{Read}{len, chan, timeout} -Read \var{len} bytes, or until \var{timeout} seconds have passed, from -the channel \var{chan} (which is one of \constant{cmData}, -\constant{cmCntl} or \constant{cmAttn}). Return a 2-tuple:\ the data -read and the end-of-message flag, \constant{cmFlagsEOM}. -\end{methoddesc} - -\begin{methoddesc}[connection]{Write}{buf, chan, timeout, eom} -Write \var{buf} to channel \var{chan}, aborting after \var{timeout} -seconds. When \var{eom} has the value \constant{cmFlagsEOM}, an -end-of-message indicator will be written after the data (if this -concept has a meaning for this communication tool). The method returns -the number of bytes written. -\end{methoddesc} - -\begin{methoddesc}[connection]{Status}{} -Return connection status as the 2-tuple \code{(\var{sizes}, -\var{flags})}. \var{sizes} is a 6-tuple giving the actual buffer sizes used -(see \function{CMNew()}), \var{flags} is a set of bits describing the state -of the connection. -\end{methoddesc} - -\begin{methoddesc}[connection]{GetConfig}{} -Return the configuration string of the communication tool. These -configuration strings are tool-dependent, but usually easily parsed -and modified. -\end{methoddesc} - -\begin{methoddesc}[connection]{SetConfig}{str} -Set the configuration string for the tool. The strings are parsed -left-to-right, with later values taking precedence. This means -individual configuration parameters can be modified by simply appending -something like \code{'baud 4800'} to the end of the string returned by -\method{GetConfig()} and passing that to this method. The method returns -the number of characters actually parsed by the tool before it -encountered an error (or completed successfully). -\end{methoddesc} - -\begin{methoddesc}[connection]{Choose}{} -Present the user with a dialog to choose a communication tool and -configure it. If there is an outstanding connection some choices (like -selecting a different tool) may cause the connection to be -aborted. The return value (one of the \constant{choose*} constants) will -indicate this. -\end{methoddesc} - -\begin{methoddesc}[connection]{Idle}{} -Give the tool a chance to use the processor. You should call this -method regularly. -\end{methoddesc} - -\begin{methoddesc}[connection]{Abort}{} -Abort an outstanding asynchronous \method{Open()} or \method{Listen()}. -\end{methoddesc} - -\begin{methoddesc}[connection]{Reset}{} -Reset a connection. Exact meaning depends on the tool. -\end{methoddesc} - -\begin{methoddesc}[connection]{Break}{length} -Send a break. Whether this means anything, what it means and -interpretation of the \var{length} parameter depends on the tool in -use. -\end{methoddesc} |