program.h 2.24 KB
Newer Older
1 2 3 4
/*****************************************************************************
 * program.h : SAP programs classes definition
 ****************************************************************************
 * Copyright (C) 1998-2002 VideoLAN
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
5
 * $Id$ 
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
 *
 * Authors: Damien Lucas <nitrox@videolan.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
 * 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.
 *****************************************************************************/


class Program
{
  public:
28
    Program(string, string, string, string, string, uint16_t);
29 30
    Program();
    ~Program();
31

32
    /*  Functions to get the values */
33 34 35 36 37
    string GetName();
    string GetUser();
    string GetMachine();
    string GetSite();
    string GetAddress();
38
    uint16_t GetPort();
39
    string GetTTL();
40
    string GetPlGroup();
41
    string GetCustomSDP();
42 43

    /* Functions to set the values */
44 45 46 47 48
    void SetName(const char*);
    void SetUser(const char*);
    void SetMachine(const char*);
    void SetSite(const char*);
    void SetAddress(const char*);
49
    void SetPort(uint16_t);
50 51
    void SetTTL(const char *);
    void SetPlGroup(const char *);
52
    void SetHasPlGroup(bool);
53
    void SetRTP(bool);
54
    void SetCustomSDP(const char *);
55

56
    bool IsPermanent();
57
    bool IsRTP();
58
    bool HasPlGroup();
59
    bool HasCustomSDP();
60 61 62 63 64 65 66

  private:
    string name;
    string user;
    string machine;
    string site;
    string address;
67
    string program_ttl;
68
    string pl_group;
69
    string custom_sdp;
70
    bool permanent;
71
    bool b_rtp;
72
    bool b_has_pl_group;
73
    uint16_t port;
74 75 76
    uint32_t start_time;
    uint32_t stop_time;
    /* TODO support for periodical programs */
77
};