home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / lib / libpics / csllst.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  4.9 KB  |  204 lines

  1.  
  2. /*  W3 Copyright statement 
  3. Copyright 1995 by: Massachusetts Institute of Technology (MIT), INRIA</H2>
  4.  
  5. This W3C software is being provided by the copyright holders under the
  6. following license. By obtaining, using and/or copying this software,
  7. you agree that you have read, understood, and will comply with the
  8. following terms and conditions: 
  9.  
  10. Permission to use, copy, modify, and distribute this software and its
  11. documentation for any purpose and without fee or royalty is hereby
  12. granted, provided that the full text of this NOTICE appears on
  13. <EM>ALL</EM> copies of the software and documentation or portions
  14. thereof, including modifications, that you make. 
  15.  
  16. <B>THIS SOFTWARE IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO
  17. REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED.  BY WAY OF EXAMPLE,
  18. BUT NOT LIMITATION, COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR
  19. WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR
  20. THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY
  21. THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
  22. COPYRIGHT HOLDERS WILL BEAR NO LIABILITY FOR ANY USE OF THIS SOFTWARE
  23. OR DOCUMENTATION.
  24.  
  25. The name and trademarks of copyright holders may NOT be used
  26. in advertising or publicity pertaining to the software without
  27. specific, written prior permission.  Title to copyright in this
  28. software and any associated documentation will at all times remain
  29. with copyright holders. 
  30. */
  31. /*                                                                       Label data internals
  32.                                    LABEL DATA INTERNALS
  33.                                              
  34.  */
  35. /*
  36. **      (c) COPYRIGHT MIT 1996.
  37. **      Please first read the full copyright statement in the file COPYRIGH.
  38. */
  39. /*
  40.  
  41.    This module defines the Label data structures read by CSParser.c. Applications will
  42.    include this if they want direct access to the data (as opposed to using iterator
  43.    methods).
  44.    
  45.    The following data structures relate to the data encapsulated in a PICS Label. Each
  46.    data type correlates to a time in the BNF for the label description. See PICS Labels
  47.    spec for more details.
  48.    
  49.  */
  50. #ifndef CSLLST_H
  51. #define CSLLST
  52. /*
  53.  
  54. LABEL ERROR
  55.  
  56.    combination of:
  57.    
  58.    _label-error_
  59.    
  60.    _service-error_
  61.    
  62.    _service-info_ 'no-ratings'
  63.    
  64.  */
  65. typedef struct {
  66.     LabelErrorCode_t errorCode;
  67.     HTList * explanations; /* HTList of (char *) */
  68.     } LabelError_t;
  69. /*
  70.  
  71. EXTENSION DATA
  72.  
  73.    called _data_ in the BNF
  74.    
  75.  */
  76. typedef struct ExtensionData_s ExtensionData_t;
  77. struct ExtensionData_s {
  78.     char * text;
  79.     BOOL quoted;
  80.     HTList * moreData;
  81.     ExtensionData_t * pParentExtensionData;
  82.     };
  83. /*
  84.  
  85. EXTENSION
  86.  
  87.    _option_ 'extension'
  88.    
  89.  */
  90. typedef struct {
  91.     BOOL mandatory;
  92.     SVal_t url;
  93.     HTList * extensionData;
  94.     } Extension_t;
  95. /*
  96.  
  97. LABEL OPTIONS
  98.  
  99.    called _option_ in the BNF
  100.    
  101.  */
  102. typedef struct LabelOptions_s LabelOptions_t;
  103. struct LabelOptions_s {
  104.     DVal_t at;
  105.     SVal_t by;
  106.     SVal_t complete_label;
  107.     BVal_t generic;
  108.     SVal_t fur; /* for is a reserved word */
  109.     SVal_t MIC_md5;
  110.     DVal_t on;
  111.     SVal_t signature_PKCS;
  112.     DVal_t until;
  113.     HTList * comments;
  114.     HTList * extensions;
  115.     /* find service-level label options */
  116.     LabelOptions_t * pParentLabelOptions;
  117.     };
  118.  
  119. /*
  120.  
  121. RATING
  122.  
  123.    called _rating_ in the BNF
  124.    
  125.  */
  126. typedef struct {
  127.     SVal_t identifier;
  128.     FVal_t value;
  129.     HTList * ranges;
  130.     } LabelRating_t;
  131. /*
  132.  
  133. SINGLELABEL
  134.  
  135.    called _single-label_ in the BNF
  136.    
  137.  */
  138. typedef struct {
  139.     LabelOptions_t * pLabelOptions;
  140.     HTList * labelRatings;
  141.     } SingleLabel_t;
  142.  
  143. /*
  144.  
  145. LABEL
  146.  
  147.    also called _label_
  148.    
  149.  */
  150. typedef struct {
  151.     LabelError_t * pLabelError;
  152.     HTList * singleLabels;
  153.     SingleLabel_t * pSingleLabel;
  154.     } Label_t;
  155. /*
  156.  
  157. SERVICEINFO
  158.  
  159.    called _service-info_ in the BNF
  160.    
  161.  */
  162. typedef struct {
  163.     SVal_t rating_service;
  164.     LabelOptions_t * pLabelOptions;
  165.     LabelError_t * pLabelError;
  166.     HTList * labels;
  167.     } ServiceInfo_t;
  168. /*
  169.  
  170. CSLLDATA
  171.  
  172.    The whole shebang.
  173.    
  174.  */
  175. struct CSLLData_s {
  176.     FVal_t version;
  177.     LabelError_t * pLabelError;
  178.     HTList * serviceInfos;
  179.  
  180.     /* some usefull flags */
  181.     BOOL complete;
  182.     BOOL hasTree; /* so it can't make a list of labels */
  183.     int mandatoryExtensions;
  184.     };
  185. /*
  186.  
  187.    --------------these need the above structures--------------
  188.    
  189.  */
  190. extern CSLLData_t * CSLabel_getCSLLData(CSLabel_t * me);
  191. extern LabelError_t * CSLabel_getLabelError(CSLabel_t * pCSLabel);
  192. extern LabelOptions_t * CSLabel_getLabelOptions(CSLabel_t * pCSLabel);
  193. extern ServiceInfo_t * CSLabel_getServiceInfo(CSLabel_t * pCSLabel);
  194. extern Label_t * CSLabel_getLabel(CSLabel_t * pCSLabel);
  195. extern SingleLabel_t * CSLabel_getSingleLabel(CSLabel_t * pCSLabel);
  196. extern LabelRating_t * CSLabel_getLabelRating(CSLabel_t * pCSLabel);
  197. /*
  198.  
  199.  */
  200. #endif /* CSLLST_H */
  201. /*
  202.  
  203.    End of Declaration */
  204.