aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/dabOutput/dabOutput.h18
-rw-r--r--src/utils.cpp2
-rw-r--r--src/utils.h2
3 files changed, 12 insertions, 10 deletions
diff --git a/src/dabOutput/dabOutput.h b/src/dabOutput/dabOutput.h
index 5f02f76..d68cd9c 100644
--- a/src/dabOutput/dabOutput.h
+++ b/src/dabOutput/dabOutput.h
@@ -99,7 +99,7 @@ class DabOutput
virtual ~DabOutput() {}
- virtual std::string get_info() = 0;
+ virtual std::string get_info() const = 0;
};
// ----- used in File and Fifo outputs
@@ -122,18 +122,20 @@ class DabOutputFile : public DabOutput
DabOutputFile(const DabOutputFile& other)
{
+ filename_ = other.filename_;
file_ = other.file_;
nbFrames_ = other.nbFrames_;
type_ = other.type_;
}
~DabOutputFile() {}
+ const DabOutputFile& operator=(const DabOutputFile& other) = delete;
int Open(const char* filename);
int Write(void* buffer, int size);
int Close();
- std::string get_info() {
+ std::string get_info() const {
return "file://" + filename_;
}
@@ -154,7 +156,7 @@ class DabOutputFifo : public DabOutputFile
int Write(void* buffer, int size);
- std::string get_info() {
+ std::string get_info() const {
return "fifo://" + filename_;
}
@@ -195,7 +197,7 @@ class DabOutputRaw : public DabOutput
int Write(void* buffer, int size);
int Close();
- std::string get_info() {
+ std::string get_info() const {
return "raw://" + filename_;
}
private:
@@ -234,7 +236,7 @@ class DabOutputUdp : public DabOutput
int Write(void* buffer, int size);
int Close() { return 0; }
- std::string get_info() {
+ std::string get_info() const {
return "udp://" + uri_;
}
private:
@@ -271,7 +273,7 @@ class DabOutputTcp : public DabOutput
int Write(void* buffer, int size);
int Close();
- std::string get_info() {
+ std::string get_info() const {
return "tcp://" + uri_;
}
@@ -299,7 +301,7 @@ class DabOutputSimul : public DabOutput
int Write(void* buffer, int size);
int Close() { return 0; }
- std::string get_info() {
+ std::string get_info() const {
return "simul://" + name_;
}
private:
@@ -376,7 +378,7 @@ class DabOutputZMQ : public DabOutput
zmq_pub_sock_.close();
}
- std::string get_info() {
+ std::string get_info() const {
return "zmq: " + zmq_proto_ + "://" + endpoint_;
}
diff --git a/src/utils.cpp b/src/utils.cpp
index 071c0e9..ec3e0c7 100644
--- a/src/utils.cpp
+++ b/src/utils.cpp
@@ -354,7 +354,7 @@ void printUsage(char *name, FILE* out)
}
#endif
-void printOutputs(vector<shared_ptr<DabOutput> >& outputs)
+void printOutputs(const vector<shared_ptr<DabOutput> >& outputs)
{
int index = 0;
diff --git a/src/utils.h b/src/utils.h
index 485ca9b..544c6ca 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -51,7 +51,7 @@ void printUsageConfigfile(char *name, FILE* out = stderr);
/* The following four utility functions display a
* description of all outputs, services, components
* resp. subchannels*/
-void printOutputs(std::vector<std::shared_ptr<DabOutput> >& outputs);
+void printOutputs(const std::vector<std::shared_ptr<DabOutput> >& outputs);
void printServices(const std::vector<std::shared_ptr<DabService> >& services);