2 * Copyright (C) 1998-2015 Paul Davis <paul@linuxaudiosystems.com>
3 * Copyright (C) 2015-2019 Robin Gareus <robin@gareus.org>
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24 #include "pbd/transmitter.h"
25 #include "pbd/error.h"
30 Transmitter::Transmitter (Channel c)
47 /* we should never call Transmitter::deliver
48 for thrown messages (because its overridden in the
49 class heirarchy). force a segv if we do.
57 Transmitter::deliver ()
60 /* NOTE: this is just a default action for a Transmitter or a
61 derived class. Any class can override this to produce some
62 other action when deliver() is called.
67 /* send the SigC++ signal */
69 (*send) (channel, str().c_str());
71 /* XXX when or how can we delete this ? */
74 /* return to a pristine state */
80 /* do the right thing if this should not return */
82 if (does_not_return()) {
83 #ifndef PLATFORM_WINDOWS
84 // TODO !!!! Commented out temporarily (for Windows)
91 /* JE - From what I can tell, the above code suspends
92 * program execution until (any) signal occurs. Not
93 * sure at the moment what this achieves, unless it
94 * provides some time for the user to see the message.
101 Transmitter::does_not_return ()
104 if (channel == Fatal || channel == Throw) {
113 void pbd_c_error (const char *str)
116 PBD::error << str << endmsg;