home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / opendc12.zip / od124os2.exe / od12osp1.exe / src / dynamicp / bregist / rgetkind.c < prev    next >
Text File  |  1997-04-02  |  3KB  |  63 lines

  1. /*====START_GENERATED_PROLOG======================================
  2.  */
  3. /*
  4.  *   COMPONENT_NAME: oddynamicpart
  5.  *
  6.  *   CLASSES: none
  7.  *
  8.  *   ORIGINS: 82,27
  9.  *
  10.  *
  11.  *   (C) COPYRIGHT International Business Machines Corp. 1995,1996
  12.  *   All Rights Reserved
  13.  *   Licensed Materials - Property of IBM
  14.  *   US Government Users Restricted Rights - Use, duplication or
  15.  *   disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  16.  *       
  17.  *   IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  18.  *   ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  19.  *   PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  20.  *   CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
  21.  *   USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
  22.  *   OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
  23.  *   OR PERFORMANCE OF THIS SOFTWARE.
  24.  */
  25. /*====END_GENERATED_PROLOG========================================
  26.  */
  27. /* @(#) 1.3 com/src/samples/dynamicp/bregist/rgetkind.c, oddynamicpart, od96os2, odos29712d 11/1/96 08:50:22 [3/21/97 17:44:49]
  28. *******************************************************************
  29. ** Name: _IDL_SEQUENCE_PartKindInfo clsGetODPartKinds
  30. **
  31. ** Description:  Override method to determine the part kinds this
  32. **               part handler is capable of handling.
  33. **
  34. *******************************************************************
  35. */
  36. {
  37.    _IDL_SEQUENCE_PartKindInfo DynamicPartInfo;
  38.  
  39.    // creating PartKindInfo Structure and allocating memory for variables
  40.    PartKindInfo * info = (PartKindInfo *) SOMMalloc(sizeof(PartKindInfo));
  41.    info->partKindName = (ISOString)SOMMalloc(strlen(kKindTestDynamicPart)+1);
  42.    info->partKindDisplayName = (string)SOMMalloc(strlen(kDynamicPartKindDisplayName)+1);
  43.    info->filenameFilters = (string)SOMMalloc(strlen(kDynamicPartFileNameFilter)+1);
  44.    info->filenameTypes = (string)SOMMalloc(strlen(kDynamicPartFileNameType)+1);
  45.    info->categories = (string)SOMMalloc(strlen(kDynamicPartCategory)+1);
  46.    info->categoryDisplayName = (string)SOMMalloc(strlen(kDynamicPartCategory)+1);
  47.    info->objectID = (string)SOMMalloc(strlen(" ")+1);
  48.  
  49.    // copy the information into the structure
  50.    strcpy(info->partKindName,kKindTestDynamicPart);
  51.    strcpy(info->partKindDisplayName,kDynamicPartKindDisplayName);
  52.    strcpy(info->filenameFilters,kDynamicPartFileNameFilter);
  53.    strcpy(info->filenameTypes,kDynamicPartFileNameType);
  54.    strcpy(info->categories, kDynamicPartCategory);
  55.    strcpy(info->categoryDisplayName, kDynamicPartCategory);
  56.    strcpy(info->objectID," ");
  57.  
  58.    DynamicPartInfo._maximum = 1;
  59.    DynamicPartInfo._length = 1;
  60.    DynamicPartInfo._buffer = info;
  61.    return DynamicPartInfo;
  62. }  // end rGetKind.c
  63.