summaryrefslogtreecommitdiff
path: root/libsi/descriptor.c
diff options
context:
space:
mode:
Diffstat (limited to 'libsi/descriptor.c')
-rw-r--r--libsi/descriptor.c37
1 files changed, 33 insertions, 4 deletions
diff --git a/libsi/descriptor.c b/libsi/descriptor.c
index 06a58c0a..5efa421c 100644
--- a/libsi/descriptor.c
+++ b/libsi/descriptor.c
@@ -6,7 +6,7 @@
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
- * $Id: descriptor.c 2.2 2011/06/15 21:26:00 kls Exp $
+ * $Id: descriptor.c 2.3 2011/12/10 15:47:15 kls Exp $
* *
***************************************************************************/
@@ -1005,8 +1005,14 @@ int MHP_TransportProtocolDescriptor::getComponentTag() const {
return componentTag;
}
+char *MHP_TransportProtocolDescriptor::getUrlBase(char *buffer, int size) {
+ return UrlBase.getText(buffer, size);
+}
+
void MHP_TransportProtocolDescriptor::Parse() {
int offset=0;
+ remote=false;
+ componentTag=-1;
data.setPointerAndOffset<const descr_transport_protocol>(s, offset);
if (getProtocolId() == ObjectCarousel) {
const transport_via_oc *oc;
@@ -1021,12 +1027,24 @@ void MHP_TransportProtocolDescriptor::Parse() {
data.setPointerAndOffset<const transport_via_oc_end>(rem, offset);
componentTag=rem->component_tag;
}
- } else { //unimplemented
- remote=false;
- componentTag=-1;
+ } else if (getProtocolId() == HTTPoverInteractionChannel) {
+ const transport_via_http *http;
+ data.setPointerAndOffset<const transport_via_http>(http, offset);
+ UrlBase.setDataAndOffset(data+offset, http->url_base_length, offset);
+
+ // fill URL Extension,
+ UrlExtensionLoop.setData(data+offset, getLength()-offset);
+ } else {
+ //unimplemented
}
}
+void MHP_TransportProtocolDescriptor::UrlExtensionEntry::Parse() {
+ const descr_url_extension_entry *s;
+ s=data.getData<const descr_url_extension_entry>();
+ UrlExtension.setData(data, s->url_extension_length);
+}
+
void MHP_DVBJApplicationDescriptor::Parse() {
applicationLoop.setData(data+sizeof(descr_dvbj_application), getLength()-sizeof(descr_dvbj_application));
}
@@ -1059,6 +1077,17 @@ void MHP_ApplicationIconsDescriptor::Parse() {
data.setPointerAndOffset<const descr_application_icons_descriptor_end>(s, offset);
}
+char *MHP_SimpleApplicationLocationDescriptor::getLocation(char *buffer, int size) {
+ return location.getText(buffer, size);
+}
+
+void MHP_SimpleApplicationLocationDescriptor::Parse() {
+ int offset=0;
+ const descr_simple_application_location_descriptor *loc;
+ data.setPointerAndOffset<const descr_simple_application_location_descriptor>(loc, offset);
+ location.setDataAndOffset(data+offset, loc->descriptor_length, offset);
+}
+
int RegistrationDescriptor::getFormatIdentifier() const {
return HILOHILO(s->format_identifier);
}