home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / include / pics.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  1.9 KB  |  67 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 PICS_H
  20. #define PICS_H
  21.  
  22. typedef struct {
  23.    char    *service;
  24.    XP_Bool  generic;
  25.    char    *fur;     /* means 'for' */
  26.    XP_List *ratings;
  27. } PICS_RatingsStruct;
  28.  
  29. typedef struct {
  30.    char         *name;
  31.    double          value;
  32. } PICS_RatingValue;
  33.  
  34. typedef enum {
  35.    PICS_RATINGS_PASSED,
  36.    PICS_RATINGS_FAILED,
  37.    PICS_NO_RATINGS
  38. } PICS_PassFailReturnVal;
  39.  
  40. void PICS_FreeRatingsStruct(PICS_RatingsStruct *rs);
  41.  
  42. /* return NULL or ratings struct */
  43. PICS_RatingsStruct * PICS_ParsePICSLable(char * label);
  44.  
  45. /* returns TRUE if page should be censored
  46.  * FALSE if page is allowed to be shown
  47.  */
  48. PICS_PassFailReturnVal PICS_CompareToUserSettings(PICS_RatingsStruct *rs, char *cur_page_url);
  49.  
  50. XP_Bool PICS_IsPICSEnabledByUser(void);
  51.  
  52. XP_Bool PICS_AreRatingsRequired(void);
  53.  
  54. /* returns a URL string from a RatingsStruct
  55.  * that includes the service URL and rating info
  56.  */
  57. char * PICS_RStoURL(PICS_RatingsStruct *rs, char *cur_page_url);
  58.  
  59. void PICS_Init(MWContext *context);
  60.  
  61. XP_Bool PICS_CanUserEnableAdditionalJavaCapabilities(void);
  62.  
  63. XP_Bool PICS_CheckForValidTreeRating(char *url_address);
  64.  
  65.  
  66. #endif /* PICS_H */
  67.