-
Notifications
You must be signed in to change notification settings - Fork 1
/
Service.h
33 lines (32 loc) · 1.13 KB
/
Service.h
1
2
3
4
5
6
7
8
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
#pragma once
#include "ServiceType.h"
#include <cstdint>
#include <string>
class Service {
public:
/**
* Generate a service
* @param serviceId service ID
* @param providerName provider name
* @param name service name
* @param serviceType service type
*/
Service(uint16_t serviceId, std::string providerName=std::string(), std::string name=std::string(""), ServiceType serviceType=TV):_serviceId(serviceId),_providerName(providerName),_name(name),_serviceType(serviceType) {}
/**
* Generate a service from a channel list entry
* @param line line from channel list describing the service
*/
Service(std::string const &line);
uint16_t serviceId() const { return _serviceId; }
std::string providerName() const { return _providerName; }
std::string name() const { return _name; }
ServiceType serviceType() const { return _serviceType; }
void setProviderName(std::string providerName) { _providerName = providerName; }
void setName(std::string name) { _name = name; }
void setServiceType(ServiceType st) { _serviceType = st; }
protected:
uint16_t _serviceId;
std::string _providerName;
std::string _name;
ServiceType _serviceType;
};