/*
	en50221 encoder An implementation for libdvb
	an implementation for the High Level Common Interface

	Copyright (C) 2004, 2005 Manu Abraham (manu@kromtek.com)

	This library is free software; you can redistribute it and/or modify
	it under the terms of the GNU Lesser General Public License as
	published by the Free Software Foundation; either version 2.1 of
	the License, or (at your option) any later version.

	This program is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU Lesser General Public License for more details.

	You should have received a copy of the GNU Lesser General Public
	License along with this library; if not, write to the Free Software
	Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
*/

#ifndef __EN50221_ENCODE_H__
#define __EN50221_ENCODE_H__

#include <stdlib.h>
#include <stdint.h>
#include <linux/dvb/ca.h>
#include "pmt.h"
#include "en50221_hlci.h"
#include "descriptor.h"

uint16_t en50221_encode_header(struct ca_msg *p_ca_msg, struct en50221_pmt_object *p_en50221_pmt_object, uint16_t pos);
uint16_t en50221_encode_descriptor(struct ca_msg *p_ca_msg, struct descriptor *p_desc, uint16_t pos);
uint16_t en50221_encode_streams(struct ca_msg *p_ca_msg, struct en50221_stream *p_stream, uint16_t pos);
uint16_t encode_ca_pmt_command(struct ca_msg *p_ca_msg, void *p_encode_object, uint16_t pos, uint8_t scrambling);


#endif
