1.0b3
OTClassicContext provides the glue necessary to call the Carbon "InContext" Open Transport APIs in an InterfaceLib environment. The goal is to allow you to build a Carbon and non-Carbon application (or extension) from the same source base without conditional compilation.
Open Transport tracks assets, like memory and endpoints, in a very
Byzantine fashion. See DTS Technote 1173 Understanding
Open Transport Asset Tracking for a full description. To make
this clearer Carbon introduced a new set of Open Transport APIs, with
the suffix "InContext", which explicitly describe the context to
which assets are assigned. For example, in Carbon you must call
OTOpenEndpointInContext
rather than
OTOpenEndpoint
so that the system knows which client
owns the endpoint.
The main problem with this technique is that it is hard to maintain a source base that compiles for both Carbon and non-Carbon applications and extensions. This glue is a way around that problem.
The glue in this sample supports PowerPC code compiled for OT 1.1.1 and above. See the Caveats section for an explanation of these restrictions.
A future version of the OT SDK will contain a final release of this glue.
The sample contains the following items:
To use this glue within your project, take the following steps.
OTStreamOpen
, you must include "OTClassicContext.h"
in your source.You should be aware of the caveats associated with this glue.
InitOpenTransportUtilities
, a call which is much
misunderstood. What it does is create a client connection to Open
Transport without loading the OT kernel. This reduced memory usage
in old machines where certain OT components might want to use OT
utilities without loading the entire OT kernel into memory. On
modern systems the OT kernel is always loaded (either because OT
doesn't unload the kernel any more, or because the kernel was
loaded at system startup by one of many potential network
clients), so this restriction should not cause any problems.t_open
). In general this is a A Good Thing
(tm), although retrofitting that capability would be relatively
easy.
OTLoadCFMLibrary |
OTGetCFMSymbol |
OTGetCFMPointer |
OTFindCFMLibraries |
OTReleaseCFMConnection |
OTHoldThisCFMLibrary |
OTUnholdThisCFMLibrary |
OTLoadASLMLibrary |
OTUnloadASLMLibrary |
InitASLMForCFMLibrary |
TeardownASLMForCFMLibrary |
TrapAvailable |
other miscellaneous C and C++ runtime routines |
If you find any problems with this sample, mail <DTS@apple.com> and I'll try to fix them up.
1.0b1 (Sep 2000) was distributed to a small number of Apple engineers for review purposes.
1.0b2 (Oct 2000) was distributed to a small number of Apple engineers for review purposes. The glue is now included as an object file rather than source code.
1.0b3 (Oct 2000) was the first released version. The name of the object file has changed to better match the future OT SDK version.
Share and Enjoy.
Apple Developer Technical Support
Networking, Communications, Hardware
12 Oct 2000