message.h 1.52 KB
Newer Older
1 2 3
/*****************************************************************************
 * message.h : SAP Message Class definition
 ****************************************************************************
4
 * Copyright (C) 1998-2006 VideoLAN
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
5
 * $Id$
6 7
 *
 * Authors: Damien Lucas <nitrox@videolan.org>
8
 *          Rémi Denis-Courmont <rem # videolan dot org>
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
 *
 * 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
 * the Free Software Foundation; either version 2 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 General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
 *****************************************************************************/

#define SAP_ON 1
#define SAP_OFF 0
#define SAP_IPV4 4
#define SAP_IPV6 6

class Message {
  private:
32 33 34
    uint8_t* msg;         // final message
    size_t msg_len;
    uint16_t version;
35 36

  public:
37
    Message(uint16_t version, const char* ip);
38 39 40 41
    ~Message();
    bool AddProgram(Program*);
    uint8_t* GetFinalMessage(void) { return msg; }
    size_t GetFinalMessageLen(void) { return msg_len; }
42
};