home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / nspr30-e.zip / nspr30-e / include / prsystem.h < prev    next >
C/C++ Source or Header  |  1998-11-02  |  2KB  |  80 lines

  1. /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2. /*
  3.  * The contents of this file are subject to the Netscape Public License
  4.  * Version 1.0 (the "NPL"); you may not use this file except in
  5.  * compliance with the NPL.  You may obtain a copy of the NPL at
  6.  * http://www.mozilla.org/NPL/
  7.  * 
  8.  * Software distributed under the NPL is distributed on an "AS IS" basis,
  9.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
  10.  * for the specific language governing rights and limitations under the
  11.  * NPL.
  12.  * 
  13.  * The Initial Developer of this code under the NPL is Netscape
  14.  * Communications Corporation.  Portions created by Netscape are
  15.  * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
  16.  * Reserved.
  17.  */
  18.  
  19. #ifndef prsystem_h___
  20. #define prsystem_h___
  21.  
  22. /*
  23. ** API to NSPR functions returning system info.
  24. */
  25. #include "prtypes.h"
  26.  
  27. PR_BEGIN_EXTERN_C
  28.  
  29. /*
  30. ** Get the host' directory separator.
  31. **  Pathnames are then assumed to be of the form:
  32. **      [<sep><root_component><sep>]*(<component><sep>)<leaf_name>
  33. */
  34.  
  35. PR_EXTERN(char) PR_GetDirectorySeparator(void);
  36.  
  37. /*
  38. ** OBSOLETE -- the function name is misspelled.
  39. ** Use PR_GetDirectorySeparator instead.
  40. */
  41.  
  42. PR_EXTERN(char) PR_GetDirectorySepartor(void);
  43.  
  44.  
  45. /* Types of information available via PR_GetSystemInfo(...) */
  46. typedef enum {
  47.     PR_SI_HOSTNAME,
  48.     PR_SI_SYSNAME,
  49.     PR_SI_RELEASE,
  50.     PR_SI_ARCHITECTURE
  51. } PRSysInfo;
  52.  
  53.  
  54. /*
  55. ** If successful returns a null termintated string in 'buf' for
  56. ** the information indicated in 'cmd'. If unseccussful the reason for
  57. ** the failure can be retrieved from PR_GetError().
  58. **
  59. ** The buffer is allocated by the caller and should be at least
  60. ** SYS_INFO_BUFFER_LENGTH bytes in length.
  61. */
  62.  
  63. #define SYS_INFO_BUFFER_LENGTH 256
  64.  
  65. PR_EXTERN(PRStatus) PR_GetSystemInfo(PRSysInfo cmd, char *buf, PRUint32 buflen);
  66.  
  67. /*
  68. ** Return the number of bytes in a page
  69. */
  70. PR_EXTERN(PRInt32) PR_GetPageSize(void);
  71.  
  72. /*
  73. ** Return log2 of the size of a page
  74. */
  75. PR_EXTERN(PRInt32) PR_GetPageShift(void);
  76.  
  77. PR_END_EXTERN_C
  78.  
  79. #endif /* prsystem_h___ */
  80.