Commit 91c7ab79 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Remove dead code

parent 3da82d86
/*****************************************************************************
* message.cpp : SAP Message class
****************************************************************************
* Copyright (C) 1998-2005 the VideoLAN team
* Copyright (C) 1998-2006 the VideoLAN team
* $Id$
*
* Authors: Damien Lucas <nitrox@videolan.org>
* Philippe Van Hecke <philippe.vanhecke@belnet.be>
* Derk-Jan Hartman <hartman at videolan dot org>
* Rémi Denis-Courmont <rem # videolan dot org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -46,8 +47,6 @@ Message::Message(char t, uint16_t v, const char* ip)
{
version = v;
compressed = 0;
encrypted = 0;
type = t;
ip_server=inet_addr(ip); //TODO automaticaly get it ?
msg=NULL;
......@@ -67,20 +66,6 @@ Message::~Message(void)
}
void Message::SetEncrypted(void)
{
fprintf(stderr, "Encryption is not available\n");
return;
}
void Message::SetCompressed(void)
{
fprintf(stderr, "Compression is not available\n");
return;
}
/*****************************************************************************
* BuildHeader - Build the Message Header once initialized
* According to RFC 2974 (SAP)
......@@ -106,8 +91,8 @@ void Message::BuildHeader(const char* payload_type)
sap[0]=0x20;
//if ( ip_version == SAP_IPV6 ) sap[0]|=0x10;
if ( type == SAP_DELETE ) sap[0]|=0x04;
if ( encrypted == SAP_ON ) sap[0]|=0x02;
if ( compressed == SAP_ON ) sap[0]|=0x01;
//if ( encrypted ) sap[0]|=0x02;
//if ( compressed ) sap[0]|=0x01;
/* Byte 2 : Authentification length - Not supported */
sap[1]=0x00;
......
......@@ -34,16 +34,12 @@ class Message {
~Message();
void BuildHeader(const char* payload_type);
void AddProgram(Program*);
void SetEncrypted();
void SetCompressed();
void CreateFinalMessage();
char* GetFinalMessage();
unsigned int GetFinalMessageLen();
private:
uint16_t version; // Version of this annoucement
bool compressed; // Is the message compressed with zlib ?
bool encrypted; // Is the message encrypted ?
uint8_t type; // Announce or Deletion
uint32_t ip_server; // IP of the server (IPV4 specific)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment