2N/A/*
2N/A * CDDL HEADER START
2N/A *
2N/A * The contents of this file are subject to the terms of the
2N/A * Common Development and Distribution License (the "License").
2N/A * You may not use this file except in compliance with the License.
2N/A *
2N/A * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2N/A * or http://www.opensolaris.org/os/licensing.
2N/A * See the License for the specific language governing permissions
2N/A * and limitations under the License.
2N/A *
2N/A * When distributing Covered Code, include this CDDL HEADER in each
2N/A * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2N/A * If applicable, add the following below this CDDL HEADER, with the
2N/A * fields enclosed by brackets "[]" replaced with your own identifying
2N/A * information: Portions Copyright [yyyy] [name of copyright owner]
2N/A *
2N/A * CDDL HEADER END
2N/A */
2N/A
2N/A/*
2N/A * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
2N/A * Use is subject to license terms.
2N/A */
2N/A
2N/A#ifndef _SDP_PARSE_H
2N/A#define _SDP_PARSE_H
2N/A
2N/A#pragma ident "%Z%%M% %I% %E% SMI"
2N/A
2N/A#ifdef __cplusplus
2N/Aextern "C" {
2N/A#endif
2N/A
2N/A#include <sdp.h>
2N/A#include <sys/types.h>
2N/A
2N/A#define SDP_MEMORY_ERROR 0x10000000
2N/A
2N/A#define SDP_VERSION_ORDER " "
2N/A#define SDP_ORIGIN_ORDER "v"
2N/A#define SDP_NAME_ORDER "o"
2N/A#define SDP_INFO_ORDER "s"
2N/A#define SDP_URI_ORDER "is"
2N/A#define SDP_EMAIL_ORDER "euis"
2N/A#define SDP_PHONE_ORDER "peuis"
2N/A#define SDP_CONN_ORDER "peuis"
2N/A#define SDP_BW_ORDER "bcpeuis"
2N/A#define SDP_TIME_ORDER "tbcpeuis"
2N/A#define SDP_REPEAT_ORDER "rt"
2N/A#define SDP_ZONE_ORDER "rt"
2N/A#define SDP_KEY_ORDER "zrt"
2N/A#define SDP_ATTR_ORDER "akzrt"
2N/A#define SDP_MEDIA_ORDER "makzrt"
2N/A#define SDP_M_INFO_ORDER "m"
2N/A#define SDP_M_CONN_ORDER "cim"
2N/A#define SDP_M_BW_ORDER "bcim"
2N/A#define SDP_M_KEY_ORDER "bcim"
2N/A#define SDP_M_ATTR_ORDER "akbcim"
2N/A
2N/Atypedef struct sdp_description {
2N/A /*
2N/A * Following boolean fields are used to
2N/A * check for presence of mandatory fields
2N/A * in session structure
2N/A */
2N/A boolean_t d_version; /* Version field */
2N/A boolean_t d_origin; /* Origin field */
2N/A boolean_t d_name; /* Name field */
2N/A boolean_t d_conn; /* Connection field */
2N/A boolean_t d_mconn; /* Media connection field */
2N/A boolean_t d_mparsed; /* Media parsed */
2N/A boolean_t d_tparsed; /* Time parsed */
2N/A /*
2N/A * keeps count of connection fields within
2N/A * media section
2N/A */
2N/A int d_mccount;
2N/A sdp_media_t *d_lmedia; /* Last media field */
2N/A sdp_time_t *d_ltime; /* Last time field */
2N/A uint_t d_perror; /* Parse error */
2N/A char d_prev; /* previous field */
2N/A char d_mprev; /* previous field in media section */
2N/A} sdp_description_t;
2N/A
2N/Aextern int add_value_to_list(sdp_list_t **, const char *, int,
2N/A boolean_t);
2N/Aextern int sdp_list_to_str(sdp_list_t *, char **, boolean_t);
2N/Aextern int sdp_str_to_list(sdp_list_t **, const char *, int,
2N/A boolean_t);
2N/Aextern void sdp_free_repeat(sdp_repeat_t *);
2N/Aextern void sdp_free_origin(sdp_origin_t *);
2N/Aextern void sdp_free_list(sdp_list_t *);
2N/Aextern void sdp_free_connection(sdp_conn_t *);
2N/Aextern void sdp_free_bandwidth(sdp_bandwidth_t *);
2N/Aextern void sdp_free_time(sdp_time_t *);
2N/Aextern void sdp_free_zone(sdp_zone_t *);
2N/Aextern void sdp_free_attribute(sdp_attr_t *);
2N/Aextern void sdp_free_key(sdp_key_t *);
2N/Aextern void sdp_free_media(sdp_media_t *);
2N/A
2N/A#ifdef __cplusplus
2N/A}
2N/A#endif
2N/A
2N/A#endif /* _SDP_PARSE_H */