1 /*
2  *  libzvbi - Network identification
3  *
4  *  Copyright (C) 2004-2006 Michael H. Schimek
5  *
6  *  This library is free software; you can redistribute it and/or
7  *  modify it under the terms of the GNU Library General Public
8  *  License as published by the Free Software Foundation; either
9  *  version 2 of the License, or (at your option) any later version.
10  *
11  *  This library is distributed in the hope that it will be useful,
12  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  *  Library General Public License for more details.
15  *
16  *  You should have received a copy of the GNU Library General Public
17  *  License along with this library; if not, write to the
18  *  Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19  *  Boston, MA  02110-1301  USA.
20  */
21 
22 /* $Id: network.h,v 1.2 2009/03/04 21:42:09 mschimek Exp $ */
23 
24 #ifndef __ZVBI_NETWORK_H__
25 #define __ZVBI_NETWORK_H__
26 
27 VBI_BEGIN_DECLS
28 
29 /* Public */
30 
31 /**
32  */
33 typedef enum {
34 	VBI_CNI_TYPE_NONE,
35 	VBI_CNI_TYPE_UNKNOWN = VBI_CNI_TYPE_NONE,
36 
37 	/**
38 	 * Video Programming System (VPS) format, a PDC CNI, for
39 	 * example from vbi_decode_vps_cni(). Note VPS transmits only
40 	 * the 4 lsb of the country code (0xcnn).
41 	 *
42 	 * Example ZDF: 0xDC2.
43 	 */
44 	VBI_CNI_TYPE_VPS,
45 
46 	/**
47 	 * Teletext packet 8/30 format 1, for example from
48 	 * vbi_decode_teletext_8301_cni(). The country code is stored
49 	 * in the MSB, the network code in the LSB (0xccnn).  Note
50 	 * these CNIs may use different country and network codes than
51 	 * the PDC CNIs.
52 	 *
53 	 * Example BBC 1: 0x447F, ZDF: 0x4902.
54 	 */
55 	VBI_CNI_TYPE_8301,
56 
57 	/**
58 	 * Teletext packet 8/30 format 2 (PDC), for example from
59 	 * vbi_decode_teletext_8302_cni(). The country code is stored
60 	 * in the MSB, the network code in the LSB (0xccnn).
61 	 *
62 	 * Example BBC 1: 0x2C7F, ZDF: 0x1DC2.
63 	 */
64 	VBI_CNI_TYPE_8302,
65 
66 	/**
67 	 * PDC Preselection method "A" format encoded on Teletext
68 	 * pages. This number consists of 2 hex digits for the
69 	 * country code and 3 bcd digits for the network code.
70 	 *
71 	 * Example ZDF: 0x1D102. (German PDC-A network codes 101 ... 163
72 	 * correspond to 8/30/2 codes 0xC1 ... 0xFF. Other countries may
73 	 * use different schemes.)
74 	 */
75 	VBI_CNI_TYPE_PDC_A,
76 
77 	/**
78 	 * PDC Preselection method "B" format encoded in Teletext
79 	 * packet X/26 local enhancement data (0x3cnn). X/26 transmits
80 	 * only the 4 lsb of the country code and the 7 lsb of
81 	 * the network code. To avoid ambiguity these CNIs may not
82 	 * use the same country and network codes as other PDC CNIs.
83 	 *
84 	 * Example BBC 1: 0x3C7F.
85 	 */
86 	VBI_CNI_TYPE_PDC_B
87 } vbi_cni_type;
88 
89 /* Private */
90 
91 VBI_END_DECLS
92 
93 #endif /* __ZVBI_NETWORK_H__ */
94 
95 /*
96 Local variables:
97 c-set-style: K&R
98 c-basic-offset: 8
99 End:
100 */
101