home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / nsprpub / pr / include / prsystem.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  2.0 KB  |  73 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_GetDirectorySepartor(void);
  36.  
  37.  
  38. /* Types of information available via PR_GetSystemInfo(...) */
  39. typedef enum {
  40.     PR_SI_HOSTNAME,
  41.     PR_SI_SYSNAME,
  42.     PR_SI_RELEASE,
  43.     PR_SI_ARCHITECTURE
  44. } PRSysInfo;
  45.  
  46.  
  47. /*
  48. ** If successful returns a null termintated string in 'buf' for
  49. ** the information indicated in 'cmd'. If unseccussful the reason for
  50. ** the failure can be retrieved from PR_GetError().
  51. **
  52. ** The buffer is allocated by the caller and should be at least
  53. ** SYS_INFO_BUFFER_LENGTH bytes in length.
  54. */
  55.  
  56. #define SYS_INFO_BUFFER_LENGTH 256
  57.  
  58. PR_EXTERN(PRStatus) PR_GetSystemInfo(PRSysInfo cmd, char *buf, PRUint32 buflen);
  59.  
  60. /*
  61. ** Return the number of bytes in a page
  62. */
  63. PR_EXTERN(PRInt32) PR_GetPageSize(void);
  64.  
  65. /*
  66. ** Return log2 of the size of a page
  67. */
  68. PR_EXTERN(PRInt32) PR_GetPageShift(void);
  69.  
  70. PR_END_EXTERN_C
  71.  
  72. #endif /* prsystem_h___ */
  73.