aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2014-04-17 20:19:56 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2014-04-17 20:19:56 +0200
commit5f9e7bc673025ffdc953d254be0d0c65c70ee908 (patch)
tree05c023814851e2135e22a98c676115d67334f664
parentdd428769ba5587e913cb2d768e2bca4b70f98c5d (diff)
downloaddabmux-5f9e7bc673025ffdc953d254be0d0c65c70ee908.tar.gz
dabmux-5f9e7bc673025ffdc953d254be0d0c65c70ee908.tar.bz2
dabmux-5f9e7bc673025ffdc953d254be0d0c65c70ee908.zip
Remove using directives from .h files
-rw-r--r--src/DabMux.h5
-rw-r--r--src/MuxElements.h50
-rw-r--r--src/ParserCmdline.cpp2
-rw-r--r--src/ParserCmdline.h2
-rw-r--r--src/ParserConfigfile.h4
-rw-r--r--src/dabInputZmq.cpp6
-rw-r--r--src/dabInputZmq.h10
-rw-r--r--src/utils.cpp1
-rw-r--r--src/utils.h8
9 files changed, 45 insertions, 43 deletions
diff --git a/src/DabMux.h b/src/DabMux.h
index 3c03add..d54d818 100644
--- a/src/DabMux.h
+++ b/src/DabMux.h
@@ -28,9 +28,6 @@
#ifndef _DABMUX_H
#define _DABMUX_H
-#include <vector>
-#include <functional>
-#include <algorithm>
#include <stdint.h>
#include "dabOutput/dabOutput.h"
#include "dabInput.h"
@@ -66,8 +63,6 @@
#define DEFAULT_SERVICE_ID 50
#define DEFAULT_PACKET_ADDRESS 0
-using namespace std;
-
/*****************************************************************************
***************** Definition of FIG structures ****************************
diff --git a/src/MuxElements.h b/src/MuxElements.h
index 82e839d..e6752e5 100644
--- a/src/MuxElements.h
+++ b/src/MuxElements.h
@@ -38,8 +38,6 @@
#include "RemoteControl.h"
#include "Eti.h"
-using namespace std;
-
struct dabOutput {
dabOutput(const char* proto, const char* name) :
outputProto(proto), outputName(name), output(NULL) { }
@@ -75,7 +73,7 @@ class DabLabel
const char* text() const { return m_text; }
uint16_t flag() const { return m_flag; }
- const string short_label() const;
+ const std::string short_label() const;
private:
// In the DAB standard, the label is 16 chars.
@@ -100,11 +98,11 @@ class dabEnsemble : public RemoteControllable {
}
/* Remote control */
- virtual void set_parameter(const string& parameter,
- const string& value);
+ virtual void set_parameter(const std::string& parameter,
+ const std::string& value);
/* Getting a parameter always returns a string. */
- virtual const string get_parameter(const string& parameter) const;
+ virtual const std::string get_parameter(const std::string& parameter) const;
/* all fields are public, since this was a struct before */
uint16_t id;
@@ -115,9 +113,9 @@ class dabEnsemble : public RemoteControllable {
// range: -24 to +24
int international_table;
- vector<DabService*> services;
- vector<DabComponent*> components;
- vector<dabSubchannel*> subchannels;
+ std::vector<DabService*> services;
+ std::vector<DabComponent*> components;
+ std::vector<dabSubchannel*> subchannels;
};
@@ -210,14 +208,14 @@ class DabComponent : public RemoteControllable
dabPacketComponent packet;
};
- bool isPacketComponent(vector<dabSubchannel*>& subchannels);
+ bool isPacketComponent(std::vector<dabSubchannel*>& subchannels);
/* Remote control */
- virtual void set_parameter(const string& parameter,
- const string& value);
+ virtual void set_parameter(const std::string& parameter,
+ const std::string& value);
/* Getting a parameter always returns a string. */
- virtual const string get_parameter(const string& parameter) const;
+ virtual const std::string get_parameter(const std::string& parameter) const;
virtual ~DabComponent() {}
@@ -243,16 +241,16 @@ class DabService : public RemoteControllable
bool program;
unsigned char getType(dabEnsemble* ensemble);
- unsigned char nbComponent(vector<DabComponent*>& components);
+ unsigned char nbComponent(std::vector<DabComponent*>& components);
DabLabel label;
/* Remote control */
- virtual void set_parameter(const string& parameter,
- const string& value);
+ virtual void set_parameter(const std::string& parameter,
+ const std::string& value);
/* Getting a parameter always returns a string. */
- virtual const string get_parameter(const string& parameter) const;
+ virtual const std::string get_parameter(const std::string& parameter) const;
virtual ~DabService() {}
@@ -261,21 +259,21 @@ class DabService : public RemoteControllable
DabService(const DabService& other);
};
-vector<dabSubchannel*>::iterator getSubchannel(
- vector<dabSubchannel*>& subchannels, int id);
+std::vector<dabSubchannel*>::iterator getSubchannel(
+ std::vector<dabSubchannel*>& subchannels, int id);
-vector<DabComponent*>::iterator getComponent(
- vector<DabComponent*>& components,
+std::vector<DabComponent*>::iterator getComponent(
+ std::vector<DabComponent*>& components,
uint32_t serviceId,
- vector<DabComponent*>::iterator current);
+ std::vector<DabComponent*>::iterator current);
-vector<DabComponent*>::iterator getComponent(
- vector<DabComponent*>& components,
+std::vector<DabComponent*>::iterator getComponent(
+ std::vector<DabComponent*>& components,
uint32_t serviceId);
-vector<DabService*>::iterator getService(
+std::vector<DabService*>::iterator getService(
DabComponent* component,
- vector<DabService*>& services);
+ std::vector<DabService*>& services);
unsigned short getSizeCu(dabSubchannel* subchannel);
diff --git a/src/ParserCmdline.cpp b/src/ParserCmdline.cpp
index 60ce118..69f4c4d 100644
--- a/src/ParserCmdline.cpp
+++ b/src/ParserCmdline.cpp
@@ -91,6 +91,8 @@ typedef DWORD32 uint32_t;
# include <sys/times.h>
#endif
+using namespace std;
+
bool parse_cmdline(char **argv,
int argc,
vector<dabOutput*> &outputs,
diff --git a/src/ParserCmdline.h b/src/ParserCmdline.h
index 61d90fc..fc12490 100644
--- a/src/ParserCmdline.h
+++ b/src/ParserCmdline.h
@@ -33,7 +33,7 @@
bool parse_cmdline(char **argv,
int argc,
- vector<dabOutput*> &outputs,
+ std::vector<dabOutput*> &outputs,
dabEnsemble* ensemble,
bool* enableTist,
unsigned* FICL,
diff --git a/src/ParserConfigfile.h b/src/ParserConfigfile.h
index 5c8546f..75f4f13 100644
--- a/src/ParserConfigfile.h
+++ b/src/ParserConfigfile.h
@@ -34,7 +34,7 @@
#include <boost/property_tree/ptree.hpp>
void parse_configfile(std::string configuration_file,
- vector<dabOutput*> &outputs,
+ std::vector<dabOutput*> &outputs,
dabEnsemble* ensemble,
bool* enableTist,
unsigned* FICL,
@@ -46,7 +46,7 @@ void parse_configfile(std::string configuration_file,
void setup_subchannel_from_ptree(dabSubchannel* subchan,
boost::property_tree::ptree &pt,
dabEnsemble* ensemble,
- string subchanuid,
+ std::string subchanuid,
BaseRemoteController* rc);
#endif
diff --git a/src/dabInputZmq.cpp b/src/dabInputZmq.cpp
index 1106fee..368d646 100644
--- a/src/dabInputZmq.cpp
+++ b/src/dabInputZmq.cpp
@@ -3,7 +3,7 @@
Research Center Canada)
Copyright (C) 2013, 2014 Matthias P. Braendli
- http://mpb.li
+ http://www.opendigitalradio.org
ZeroMQ input. see www.zeromq.org for more info
@@ -11,6 +11,8 @@
For the MPEG input, each zeromq message must contain one frame.
+ Encryption is provided by zmq_curve, see the corresponding manpage.
+
From the ZeroMQ manpage 'zmq':
The 0MQ lightweight messaging kernel is a library which extends the standard
@@ -61,6 +63,8 @@
# define bzero(s, n) memset(s, 0, n)
#endif
+using namespace std;
+
extern StatsServer* global_stats;
/***** Common functions (MPEG and AAC) ******/
diff --git a/src/dabInputZmq.h b/src/dabInputZmq.h
index a052815..f41defa 100644
--- a/src/dabInputZmq.h
+++ b/src/dabInputZmq.h
@@ -3,7 +3,7 @@
Research Center Canada)
Copyright (C) 2013, 2014 Matthias P. Braendli
- http://mpb.li
+ http://www.opendigitalradio.org
ZeroMQ input. see www.zeromq.org for more info
@@ -11,6 +11,8 @@
For the MPEG input, each zeromq message must contain one frame.
+ Encryption is provided by zmq_curve, see the corresponding manpage.
+
From the ZeroMQ manpage 'zmq':
The 0MQ lightweight messaging kernel is a library which extends the standard
@@ -94,11 +96,11 @@ class DabInputZmqBase : public DabInputBase, public RemoteControllable {
virtual int close();
/* Remote control */
- virtual void set_parameter(const string& parameter,
- const string& value);
+ virtual void set_parameter(const std::string& parameter,
+ const std::string& value);
/* Getting a parameter always returns a string. */
- virtual const string get_parameter(const string& parameter) const;
+ virtual const std::string get_parameter(const std::string& parameter) const;
protected:
virtual int readFromSocket(size_t framesize) = 0;
diff --git a/src/utils.cpp b/src/utils.cpp
index 5d67595..d81ec71 100644
--- a/src/utils.cpp
+++ b/src/utils.cpp
@@ -27,6 +27,7 @@
#include "DabMux.h"
#include "utils.h"
+using namespace std;
time_t getDabTime()
{
diff --git a/src/utils.h b/src/utils.h
index 2a91dbc..ee2340f 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -49,13 +49,13 @@ void printUsageConfigfile(char *name, FILE* out = stderr);
/* The following four utility functions display a
* description of all outputs, services, components
* resp. subchannels*/
-void printOutputs(vector<dabOutput*>& outputs);
+void printOutputs(std::vector<dabOutput*>& outputs);
-void printServices(vector<DabService*>& services);
+void printServices(std::vector<DabService*>& services);
-void printComponents(vector<DabComponent*>& components);
+void printComponents(std::vector<DabComponent*>& components);
-void printSubchannels(vector<dabSubchannel*>& subchannels);
+void printSubchannels(std::vector<dabSubchannel*>& subchannels);
/* Print information about the whole ensemble */
void printEnsemble(dabEnsemble* ensemble);