Oid.h revision b8e299dddd091ae24e0c08c45d91b8f937bd14d2
/* $Xorg: Oid.h,v 1.3 2000/08/17 19:48:06 cpqbld Exp $ */
/*
(c) Copyright 1996 Hewlett-Packard Company
(c) Copyright 1996 International Business Machines Corp.
(c) Copyright 1996 Sun Microsystems, Inc.
(c) Copyright 1996 Novell, Inc.
(c) Copyright 1996 Digital Equipment Corp.
(c) Copyright 1996 Fujitsu Limited
(c) Copyright 1996 Hitachi, Ltd.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the names of the copyright holders shall
not be used in advertising or otherwise to promote the sale, use or other
dealings in this Software without prior written authorization from said
copyright holders.
*/
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
#ifndef _Xp_Oid_h
#define _Xp_Oid_h
/*
* include the auto-generated XpOid enum definition
*/
#include "OidDefs.h"
/*
* messages
*/
#define XPMSG_WARN_MSS "Syntax error parsing medium-source-sizes"
#define XPMSG_WARN_ITM "Syntax error parsing input-trays-medium"
#define XPMSG_WARN_DOC_FMT "Syntax error parsing document format"
#define XPMSG_WARN_DOCFMT_LIST "Syntax error parsing document format list"
#define XPMSG_WARN_CARD_LIST "Syntax error parsing cardinal list"
/*
* macros for memory allocation
*/
/*
* list of object identifiers
*/
typedef struct _XpOidList
{
int count;
} XpOidList;
/*
* linked list of object identifiers
*/
typedef struct XpOidNodeStruct
{
struct XpOidNodeStruct* next;
} *XpOidNode;
typedef struct _XpOidLinkedList
{
int count;
/*
* XpOidMediumSourceSize and related definitions
*/
typedef struct
{
float minimum_x;
float maximum_x;
float minimum_y;
float maximum_y;
} XpOidArea;
typedef struct
{
float lower_bound;
float upper_bound;
typedef struct
{
float increment_across_feed;
float increment_in_feed;
typedef struct
{
typedef struct
{
int count;
typedef struct
{
union
{
} ms; /* "ms" is short for medium-size */
typedef struct
{
int count;
typedef struct
{
typedef struct
{
int count;
typedef enum {
} XpOidNotify;
typedef struct
{
unsigned long *list;
int count;
typedef struct
{
char* format;
char* variant;
char* version;
} XpOidDocFmt;
typedef struct
{
int count;
/*
* XpOid public methods
*/
const char* XpOidString(XpOid);
int XpOidStringLength(XpOid);
/*
* XpOidList public methods
*/
const XpOidList* valid_oids);
void XpOidListDelete(XpOidList*);
#define XpOidListCount(l) ((l) ? (l)->count : 0)
char* XpOidListString(const XpOidList*);
/*
* XpOidLinkedList public methods
*/
void XpOidLinkedListDelete(XpOidLinkedList*);
#define XpOidLinkedListCount(l) ((l) ? (l)->count : 0)
/*
* XpOidMediumSourceSize public methods
*/
const XpOidList* valid_trays,
const XpOidList* valid_medium_sizes);
void XpOidMediumSSDelete(XpOidMediumSS*);
char* XpOidMediumSSString(const XpOidMediumSS*);
/*
* XpOidTrayMediumList public methods
*/
const XpOidList* valid_trays,
const XpOidMediumSS* msss);
#define XpOidTrayMediumListTray(me, i) \
#define XpOidTrayMediumListMedium(me, i) \
char* XpOidTrayMediumListString(const XpOidTrayMediumList*);
/*
* XpOidNotify public methods
*/
/*
* XpOidDocFmt public methods
*/
void XpOidDocFmtDelete(XpOidDocFmt*);
char* XpOidDocFmtString(XpOidDocFmt*);
/*
* XpOidDocFmtList public methods
*/
const XpOidDocFmtList* valid_fmts);
void XpOidDocFmtListDelete(XpOidDocFmtList*);
char* XpOidDocFmtListString(const XpOidDocFmtList*);
#define XpOidDocFmtListGetDocFmt(me, i) \
const XpOidDocFmt* fmt);
/*
* XpOidCardList public methods
*/
const XpOidCardList* valid_cards);
void XpOidCardListDelete(XpOidCardList*);
char* XpOidCardListString(const XpOidCardList*);
/*
* misc parsing functions
*/
const char** ptr_return,
unsigned long* unsigned_return);
#endif /* _Xp_Oid_h - don't add anything after this line */