/* *********************************************************************
 * *	                                                               *
 * *          Definitions for Sigmet's Private Library                 *
 * *                                                                   *
 * *********************************************************************
 * File: include/private_lib.h
 *
 *                   COPYRIGHT (c) 2003, 2004, 2006 BY
 *            VAISALA INC., WESTFORD MASSACHUSETTS, U.S.A.
 * 
 * THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND  COPIED
 * ONLY  IN  ACCORDANCE WITH  THE  TERMS  OF  SUCH  LICENSE  AND WITH THE
 * INCLUSION OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE  OR  ANY OTHER
 * COPIES  THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY
 * OTHER PERSON.  NO TITLE TO AND OWNERSHIP OF  THE  SOFTWARE  IS  HEREBY
 * TRANSFERED.
 */
#define SIGMET_PRIVATE_LIB_H 1

#ifdef __cplusplus
extern "C" {
#endif

#define LIC_FEATS_ID       (1)     /* ID of the IRIS Features licenses */
#define LIC_706PRODS_ID    (2)     /* ID of 7.06 IRIS Product licenses */
#define LIC_NEWPRODS_ID    (3)     /* ID of current IRIS Product licenses */
#define LIC_CANADAPRODS_ID (4)     /* ID of Canadian IRIS Product licenses */
#define LIC_RDA_ID         (5)     /* ID of RDA Features licenses */


  /* List here the specific bits in the IRIS Features license */
#define LBIT_FEATS_INGEST     (0x00001)  /* Ingest Process */
#define LBIT_FEATS_NORDRAD    (0x04000)  /* NORDRAD Process */
#define LBIT_FEATS_RIBBUILD   (0x08000)  /* Ribbon Builder Process */
#define LBIT_FEATS_WEBSERVER  (0x10000)  /* Web server Process */
#define LBIT_FEATS_HYDROCLASS (0x20000)  /* HydroClass in reingest */

#define NUM_706_PRODUCTS   (28)    /* Number of products defined in 7.06 */

  /* List here the specific bits in the RDA Features license */
#define LBIT_RDAFEATS_TSARCHIVE  (0x0001)  /* The TS archive program */
#define LBIT_RDAFEATS_DUAL_POL   (0x0002)  /* RVP8 Dual polarization */
#define LBIT_RDAFEATS_SHIPBOARD  (0x0004)  /* RCP8 Shipboard stabilization */
#define LBIT_RDAFEATS_HYDROCLASS (0x0008)  /* RVP8 HydroClass calculation */

UINT4 iLBitOfProduct		/* File: license.c */
( UINT4 iPType_a );

UINT4 iLicense706FromCurrent	/* File: license.c */
( UINT4 iCurrentBits_a );

UINT4 iLicenseCurrentFrom706	/* File: license.c */
( UINT4 i706Bits_a );

/* Possible returns from license unlocking functions
 */
#define LICENSE_OK          (0)
#define LICENSE_EXPIRED     (1)
#define LICENSE_BAD_DATE    (2)
#define LICENSE_CANADA_LOC  (3)
#define LICENSE_INVALID     (4)
#define LICENSE_MISSING     (5)

#ifdef SIGMET_SETUP_H
UINT2 iLicenseUnlockFeatures	/* File: license.c */
  (volatile const struct license_setup *pLSetup_a,
   struct ymds_time *ExpireYmds_a,  /* Year set to YEAR_MOST_RECENT if permanent */
   UINT4 *ibits_a);
#endif  /* #ifdef SIGMET_SETUP_H */

#ifdef SIGMET_SETUP_H
UINT2 iLicenseUnlockProduct	/* File: license.c */
  (volatile const struct license_setup *pLSetup_a,
   struct ymds_time *ExpireYmds_a, /* Year set to YEAR_MOST_RECENT if permanent */
   UINT4 *ibits_a,
   UINT1 *lCanada_a );             /* True if any of the licenses are for Canada */
#endif  /* #ifdef SIGMET_SETUP_H */

#ifdef SIGMET_SETUP_H
  UINT2 iLicenseUnlockRda         /* File: license.c */
  (volatile const struct license_setup *pLSetup_a,
   struct ymds_time *pExpireYmds_a,      /* Year set to YEAR_MOST_RECENT if permanent */
   UINT4 *pBits_a);                      /* Bits to return */
#endif  /* #ifdef SIGMET_SETUP_H */

#ifdef SIGMET_SETUP_H
UINT2 lLicensedToRun		/* File: license.c */
  (volatile const struct license_setup *pLSetup_a,
   SINT4 ibit_a);
#endif  /* #ifdef SIGMET_SETUP_H */

char *slicense_crc		/* File: license.c */
  ( char *string_a );

#ifdef LINUX
/* Returns the eithernet address associated with interface "eth0". *
 */
  const char *sEthernetAddress( void ); /* File: license.c */
#endif  /* #ifdef LINUX */

char *smachine_code		/* File: license.c */
  (volatile const char sitename_a[16]);


#ifdef __cplusplus
}
#endif
