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 ()
62 /* NOTE: this is just a default action for a Transmitter or a
63 derived class. Any class can override this to produce some
64 other action when deliver() is called.
69 /* send the SigC++ signal */
72 (*send) (channel, foo.c_str());
74 /* XXX when or how can we delete this ? */
77 /* return to a pristine state */
83 /* do the right thing if this should not return */
85 if (does_not_return()) {
86 #ifndef PLATFORM_WINDOWS
87 // TODO !!!! Commented out temporarily (for Windows)
94 /* JE - From what I can tell, the above code suspends
95 * program execution until (any) signal occurs. Not
96 * sure at the moment what this achieves, unless it
97 * provides some time for the user to see the message.
104 Transmitter::does_not_return ()
107 if (channel == Fatal || channel == Throw) {
116 void pbd_c_error (const char *str)
119 PBD::error << str << endmsg;