home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / oclsrc15.zip / OCL / Include / OSysLevel.h < prev    next >
C/C++ Source or Header  |  1996-08-12  |  8KB  |  268 lines

  1. // OCL - OS/2 Class Library
  2. // (c) Cubus 1995
  3. // All Rights Reserved
  4. // OSysLevel.h
  5.  
  6. /*
  7.  * Redistribution and use in source and binary forms, with or without
  8.  * modification, are permitted provided that the following conditions
  9.  * are met:
  10.  * 1. Redistributions of source code must retain the above copyright
  11.  *    notice, this list of conditions and the following disclaimer.
  12.  * 2. Neither the name Cubus nor the name Team OCL may be used to
  13.  *    endorse or promote products derived from this software
  14.  *    without specific prior written permission.
  15.  * 3. See OCL.INF for a detailed copyright notice.
  16.  *
  17.  *              THIS SOFTWARE IS PROVIDED ``AS IS'' AND
  18.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  19.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  20.  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  21.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  22.  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  23.  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  24.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  25.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  26.  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  27.  * SUCH DAMAGE.
  28.  */
  29.  
  30.  
  31. // $Header: W:/Projects/OCL/Include/rcs/OSysLevel.h 1.50 1996/08/11 23:47:32 B.STEIN Release $
  32.  
  33.  
  34. /*
  35.  
  36.   The following diagram shows the general format of a syslevel file.
  37.  
  38.      ╔═════════════════════════════╗
  39.      ║ header (SLFHEADER)          ║
  40.      ║       ...                   ║
  41. ┌────╫────── ulTableOffset         ║
  42. │    ║                             ║
  43. │    ╚═════════════════════════════╝
  44. └──>>╔═════════════════════════════╗
  45.      ║ SYSTABLE                    ║
  46.      ║       ...                   ║
  47.      ║       ...                   ║
  48.      ║       ...                   ║
  49.      ╚═════════════════════════════╝
  50.    **╔═════════════════════════════╗
  51.      ║ Updated directory list      ║
  52.      ║       ...                   ║
  53.      ║       ...                   ║
  54.      ║       ...                   ║
  55.      ╚═════════════════════════════╝
  56.  
  57.    ** Added after successful service
  58.  
  59. */
  60.  
  61.  
  62. #ifndef OSYSLEVEL_H_INCLUDED
  63.   #define OSYSLEVEL_H_INCLUDED
  64.  
  65.  
  66. // SLFHEADER - This structure contains the information in a
  67. //             SYSLEVEL file header.  The first 2 fields are used
  68. //             to verify that the file is actually a SYSLEVEL file.
  69. //             Also identified is the version, date, and offset to
  70. //             the SYSTABLE information -- see SYSTABLE
  71.  
  72.  
  73. #pragma pack(1)
  74.  
  75. typedef struct _SLFHEADER
  76. {
  77.  USHORT    usSignature;          // special # for id of syslevel file
  78.  CHAR      achSignature[8];      // id, must be 'SYSLEVEL'
  79.  CHAR      achJulian[5];         // date of version
  80.  USHORT    usSlfVersion;         // version of syslevel file, must be 1
  81.  USHORT    ausReserved[8];       // reserved
  82.  ULONG     ulTableOffset;        // offset of SYSTABLE
  83. } SLFHEADER, *PSLFHEADER;
  84.  
  85.  
  86. // SYSTABLE - This structure contains the information about
  87. //            a specific component of a particular system. This
  88. //            info includes date and level information about the
  89. //            system /subsystem and the particular component.
  90.  
  91. // defines for bSysEdition field
  92.  
  93. #define SYSED_SE         0x00     // os/2 standard edition
  94. #define SYSED_EE         0x01     // os/2 extended edition
  95. #define SYSED_ES         0x02     // os/2 extended services
  96. #define SYSED_GENERAL    0x0F     // all others
  97.  
  98.  
  99. typedef struct _SYSTABLE
  100. {
  101.  USHORT    usSysId;               // identifies system/subsytem
  102.  BYTE      bSysEdition;           // edition of system, eg SE=00, EE=01
  103.  BYTE      bSysVersion;           // version, eg 1.00=10, 1.10=11
  104.  BYTE      bSysModify;            // modify, eg 1.00=00, 1.01=01
  105.  USHORT    usSysDate;             // date of system
  106.  CHAR      achCsdLevel[8];        // subsytem CSD level, eg, XR?0000_
  107.  CHAR      achCsdPrev[8];         // as above, except for prev system
  108.  CHAR      achSysName[80];        // Title of system / subsytem (ASCIIZ)
  109.  CHAR      achCompId[9];          // component ID of subsytem
  110.  BYTE      bRefreshLevel;         // eg, for version 1.30.1, use 1
  111.  BYTE      bReserved;             // reserved, must be 0
  112.  CHAR      achType[9];            // Null terminated type (8 chars +'\0')
  113.  BYTE      usReserved[6];         // reserved, must be 0
  114. } SYSTABLE, *PSYSTABLE;
  115.  
  116.  
  117. #pragma pack()
  118.  
  119. /*
  120.  
  121. Detailed SYSTABLE Field Descriptions
  122. ------------------------------------
  123.  
  124.   This is a number that is assigned to each product that is supported for
  125. service.
  126.  
  127.   Currently assigned SYSIDs:
  128.  
  129.      SYSID   EXTENSION    (partial list)
  130.      -----   ---------
  131.  
  132.   [note:  other SYSIDs in the range A0x0 - F0x0 are used by IBM]
  133.  
  134.      C010  -    LMU   LAN Manager Utilities/2
  135.      C020  -    X25   IBM X25 Net Manager
  136.      C040  -    OSI   Communications Subsystem For OS/2 EE
  137.      C060  -    SNP   IBM Snap Dump
  138.      C070  -    ISB   ISDN Coprocessor Support Program Version 1.2
  139.      C080  -    CS2   C SET/2
  140.      C081  -    WF2   Work Frame/2
  141.      1000  -          OS/2 SE
  142.      1010  -          OS/2 Toolkit
  143.      2000  -          OS/2 Comm Mgr
  144.      2010  -          OS/2 Feature group 1  (3270 emulator)
  145.      2020  -          OS/2 Feature group 2  (Async)
  146.      4000  -          OS/2 Database Mgr
  147.      4010  -          OS/2 Query Mgr
  148.      5000  -          OS/2 LAN Requester
  149.      5010  -          OS/2 LAN Server
  150.  
  151.  
  152. bSysEdition
  153. -----------
  154.  
  155.   A number between 0 and 255 (x0-xFF) that represents the type 
  156. of product being serviced.
  157.  
  158.   OS/2 Standard Edition is 0
  159.   OS/2 Extended Edition is 1
  160.   OS/2 Extended Services is 2
  161.   All other products are classified with a general sysedition of 15 (x0F)
  162.  
  163. bSysVersion
  164. -----------
  165.  
  166.   A number between 1 and 255 (x1-xFF) that represents the
  167. major and minor version of the product being serviced.
  168.   The hi-order byte is the major version.  The lo-order byte is the
  169. minor version.  For example:
  170.  
  171.   version 1.0, use x10
  172.   version 1.1, use x11
  173.   version 2.0, use x20
  174.  
  175. bSysModify
  176. ----------
  177.  
  178.   This is a number between 0 and 255 (x0-xFF) that represents a
  179. modification version (eg, 2.01 is major version 2, minor version 0,
  180. and modify version 1)
  181.  
  182. usSysDate   
  183. ---------
  184.  
  185.   This date is the date of the product.
  186. This is represented by a 16-bit bitfield as follows (FDATE):
  187.  
  188.   unsigned day     : 5;
  189.   unsigned month   : 4;
  190.   unsigned year    : 7;
  191.  
  192. achCsdLevel
  193. -----------
  194.  
  195.   This field is very important.  It specifies the level of the product.
  196. It must be exactly 8 characters with underscore ('_') as its last
  197. character.
  198.   The first two characters are specific to the product:
  199.  
  200.   OS/2 Standard Edition - XR
  201.   OS/2 Extended Edition - WR
  202.  
  203.   The third character represents the country:
  204.  
  205. 0 - United States (Note: This is the digit zero, not letter O)
  206. C - Canada (French speaking)
  207. D - Denmark
  208. F - France
  209. G - German
  210. H - Netherlands
  211. I - Italy
  212. J - Japan
  213. L - Finland
  214. N - Norway
  215. P - Portugal
  216. S - Spain
  217. U - United Kingdom
  218. W - Sweden
  219.  
  220. achCsdPrev
  221. ----------
  222.  
  223.   This represents the previous level of the system and has the same
  224. form as achCsdLevel.  For an initial release, this should be the same
  225. as achCsdLevel.
  226.  
  227. achSysName
  228. ----------
  229.  
  230.   This is the translated name of the system.  This must be null-
  231. terminated and has a maximum length of 80 characters.
  232.  
  233. achCompId
  234. ---------
  235.  
  236.   This is a 9-digit ascii number that represents sub-products.
  237.   For IBM OS/2 Base Operating System, this is 560109001.
  238.  
  239. bRefreshLevel
  240. -------------
  241.  
  242.   This represents the refresh level.  This field is not matched
  243. by the service tool, but is displayed from syslevel.exe.
  244.   For version 1.30.1, use 1 for bRefreshLevel.
  245.  
  246. achType
  247. -------
  248.  
  249.   This field contains an optional, NULL terminated alphanumeric type that is
  250. defined by the application.  This field is only used by the OS/2 2.0 version
  251. of SYSLEVEL.EXE.  The OS/2 1.3 SYSLEVEL.EXE will ignore this field.  If
  252. no type is desired, this field must be all zero's (0).  Because the field is
  253. NULL terminated, it has a maximum length of 8 characters (+ NULL = 9).
  254.  
  255. usReserved
  256. ----------
  257.  
  258. All reserved fields must be zero (0).
  259.  
  260. */
  261.  
  262. #endif // OSYSLEVEL_H_INCLUDED
  263.  
  264.  
  265. // end of source
  266.