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

  1. //====START_GENERATED_PROLOG======================================
  2. //
  3. //
  4. //   COMPONENT_NAME: odutils
  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.5 com/src/utils/include/NmSpcUtl.h, odutils, od96os2, odos29646d 7/15/96 18:00:43 [ 11/15/96 15:29:32 ]
  28. /*
  29.     File:        NmSpcUtl.h
  30.  
  31.     Contains:    Utilities for working with NameSpaces.
  32.  
  33.     Owned by:    Caia Grisar
  34.  
  35.     Copyright:    ⌐ 1994 - 1995 by Apple Computer, Inc., all rights reserved.
  36.  
  37.     
  38.  
  39.     In Progress:
  40.         
  41. */
  42.  
  43.  
  44. #ifndef _NMSPCUTL_
  45. #define _NMSPCUTL_
  46.  
  47. #ifndef _ODTYPES_
  48. #include <ODTypes.h>
  49. #endif
  50.  
  51. #ifndef _STORUTIL_
  52. #include "StorUtil.h"
  53. #endif
  54.  
  55. class ODValueNameSpace;
  56. class ODValueIterator;
  57.  
  58. extern "C" {
  59.     void        ValueNameSpaceRegister(ODValueNameSpace* ns, Environment* ev, ODISOStr key, ODPtr buffer, ODULong size);
  60.  
  61.     ODBoolean    ValueNameSpaceGetEntry(ODValueNameSpace* ns, Environment* ev, ODISOStr key, ODPtr* value, ODULong* valueLength);
  62.                 // value must be a pointer to where you would like to have a 
  63.                 // pointer written. If the entry exists, a copy will be
  64.                 // allocated and returned in *value, which you must eventually
  65.                 // deallocate (because you now own this space); otherwise
  66.                 // *value will be nil when there is no such entry.
  67.     
  68.     ODBoolean    ValueNameSpaceGetODName(ODValueNameSpace* ns, Environment* ev, ODISOStr key, ODName** value);
  69.                 // value must be a pointer to an ODName to where you would like to have a 
  70.                 // pointer written. If the entry exists, an IText will be created
  71.                 // and returned in *value, which you must eventually
  72.                 // dispose of (because you now own this space); otherwise
  73.                 // *value will be nil when there is no such entry.
  74.     
  75.     void        ValueIteratorFirst(ODValueIterator* nsitr, Environment* ev, ODISOStr* key, ODPtr* value, ODULong* valueLength);
  76.                 // Unless the iteration is complete, *key and *value return
  77.                 // newly allocated copies of the next key and value.  You are
  78.                 // responsible for deallocated this space when you are done
  79.                 // with it.
  80.     
  81.     void        ValueIteratorNext(ODValueIterator* nsitr, Environment* ev, ODISOStr* key, ODPtr* value, ODULong* valueLength);
  82.                 // Unless the iteration is complete, *key and *value return
  83.                 // newly allocated copies of the next key and value.  You are
  84.                 // responsible for deallocated this space when you are done
  85.                 // with it.
  86.  
  87.     ODISOStr    ValueNameSpaceGetString( ODSession*, ODISOStr nameSpaceName, ODISOStr key );
  88.                 // ** Returns pointer to new copy of string, or NULL.
  89.                     
  90.     void ValueNameSpaceWriteToFile( ODValueNameSpace* ns, PlatformFile* file );
  91.     void ValueNameSpaceReadFromFile( ODValueNameSpace* ns, PlatformFile* file );
  92.     ODTradITextData* CreateFlatIText(ODScriptCode scriptCode, ODLangCode langCode, 
  93.                                                 char* theText, ODUShort textLen);
  94. }
  95.  
  96. #endif
  97.