program.cpp 2.18 KB
Newer Older
1 2 3 4
/*****************************************************************************
 * program.cpp : SAP Program class
 ****************************************************************************
 * Copyright (C) 1998-2002 VideoLAN
5
 * $Id: program.cpp,v 1.3 2003/05/25 21:41:19 alexis Exp $
6 7
 *
 * Authors: Damien Lucas <nitrox@videolan.org>
8
 *          Philippe Van Hecke <philippe.vanhecke@belnet.be>
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
 *
 * 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.
 *****************************************************************************/

#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <stdlib.h>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;

#include "program.h"

36 37 38 39 40
Program::Program()
{
    permanent=true;
    return;
}
41 42 43 44 45 46 47
Program::~Program() {return;}

string Program::GetName(void) {return name;}
string Program::GetUser(void) {return user;}
string Program::GetMachine(void) {return machine;}
string Program::GetSite(void) {return site;}
string Program::GetAddress(void){return address;}
48
string Program::GetPort(void){return port;}
49
bool   Program::IsPermanent(void){return permanent;}
50 51 52 53 54 55

void Program::SetName(char* n){name=n;}
void Program::SetUser(char* u){user=u;}
void Program::SetMachine(char* m){machine=m;}
void Program::SetSite(char* s){site=s;}
void Program::SetAddress(char* a){address=a;}
56
void Program::SetPort(char* p){port=p;}
57

58
Program::Program(string n, string u, string m, string s, string a,string p)
59 60 61 62 63 64
{
    name=n;
    user=u;
    machine=m;
    site=s;
    address=a;
65
    port=p;
66
    permanent=true;
67
}