home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / warphead.zip / H / TARGTHDR.H < prev    next >
C/C++ Source or Header  |  1997-02-28  |  5KB  |  109 lines

  1. /* @(#)Z 1.4 com/src/bento/TargtHdr.h, odstorage, od96os2, odos29646d 96/11/15 15:26:38 (96/10/29 09:14:03) */
  2. /*====START_GENERATED_PROLOG======================================
  3.  */
  4. /*
  5.  *   COMPONENT_NAME: odstorage
  6.  *
  7.  *   CLASSES: none
  8.  *
  9.  *   ORIGINS: 82,27
  10.  *
  11.  *
  12.  *   (C) COPYRIGHT International Business Machines Corp. 1995,1996
  13.  *   All Rights Reserved
  14.  *   Licensed Materials - Property of IBM
  15.  *   US Government Users Restricted Rights - Use, duplication or
  16.  *   disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  17.  *       
  18.  *   IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  19.  *   ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  20.  *   PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  21.  *   CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
  22.  *   USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
  23.  *   OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
  24.  *   OR PERFORMANCE OF THIS SOFTWARE.
  25.  */
  26. /*====END_GENERATED_PROLOG========================================
  27.  */
  28.  
  29. /*
  30.     File:        TargtHdr.h
  31.  
  32.     Contains:    Header for Target Handler for Bento Container Suite
  33.  
  34.     Written by:    Vincent Lo
  35.  
  36.     Copyright:    ⌐ 1993-1994 by Apple Computer, Inc., all rights reserved.
  37.  
  38.     Change History (most recent first):
  39.  
  40.          <1>     5/27/94    VL        first checked in
  41.  
  42.     To Do:
  43. */
  44.  
  45. /* (use tabs = 2 to view this file correctly) */
  46. /*---------------------------------------------------------------------------*
  47.  |                                                                           |
  48.  |                     <<< TargetContainerHandlers.c >>>                     |
  49.  |                                                                           |
  50.  |        Container Manager Basic Target Container Handlers Interfaces       |
  51.  |                                                                           |
  52.  |                               Ira L. Ruben                                |
  53.  |                                 5/28/92                                   |
  54.  |                                                                           |
  55.  |                    Copyright Apple Computer, Inc. 1992                    |
  56.  |                           All rights reserved.                            |
  57.  |                                                                           |
  58.  *---------------------------------------------------------------------------*
  59.  
  60.  This file contains an the interfaces for of basic container I/O handler's metahandler
  61.  used by the Container Manager when doing updating operations on a target container.  The
  62.  "I/O" defined by this methandler is in terms of Container Manager API calls on a dynamic
  63.  OR real value.
  64.  
  65.  See TargetContainerHandlers.c for complete details.
  66.  
  67.  Note, this header and its corresponding code are NOT to be viewed as example handlers.
  68.  They are not internal to the Container Manager code for portability reasons.  That is 
  69.  because these handlers, like all other handlers may have to be modified as a function of
  70.  a particular hardware installation (for example, TOC and label I/O handlers for machines
  71.  with different byte sizes).
  72. */
  73.  
  74. #ifndef _TARGTHDR_
  75. #define _TARGTHDR_
  76.  
  77. #include "CMAPI.h"
  78.  
  79.                                                                         CM_CFUNCTION
  80.     
  81. CMHandlerAddr CM_FIXEDARGS targetContainerMetahandler(CMType targetType, CMconst_CMGlobalName operationType);
  82.     /*
  83.     Metahandler proc for determining the addresses of the handler operation routines.  The
  84.     API user is expected to register a predefined type, CMTargetHandlersTypeName (defined 
  85.     in CM_API_StdObjIDs.h), with this methandler using CMSetMetaHandler().  The Container
  86.     Manager uses this type to open the target container.  That, in turn, will use this
  87.     metahandler due to the methandler/type association.  The methandler will thus return the
  88.     addresses of the handler routines defined in TargetContainerHandlers.c. 
  89.     */
  90.  
  91. CMRefCon open_Handler(CMRefCon attributes, CMOpenMode mode);
  92. void close_Handler(CMRefCon refCon);
  93. CMSize seek_Handler(CMRefCon refCon, CM_LONG posOff, CMSeekMode mode);
  94. CMSize tell_Handler(CMRefCon refCon);
  95. CMSize read_Handler(CMRefCon refCon, CMPtr buffer, CMSize elementSize, CMCount theCount);
  96. CMSize containerSize_Handler(CMRefCon refCon);
  97. void readLabel_Handler(CMRefCon refCon, CMMagicBytes magicByteSequence,
  98.                                                              CMContainerFlags *flags, CM_USHORT *bufSize,
  99.                                                              CM_USHORT *majorVersion, CM_USHORT *minorVersion,
  100.                                                              CMSize *tocOffset, CMSize *tocSize);
  101. CM_UCHAR *returnContainerName_Handler(CMRefCon refCon);
  102. void extractData_Handler(CMRefCon refCon, CMDataBuffer buffer,
  103.                                                                   CMSize size, CMPrivateData data);
  104. void formatData_Handler(CMRefCon refCon, CMDataBuffer buffer, CMSize size, CMPrivateData data);
  105.  
  106.                                                                     CM_END_CFUNCTION
  107.  
  108. #endif
  109.