[beast: 2/47] BSE: add Server.send_user_message() which triggers a user_message signal emissioon
- From: Tim Janik <timj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [beast: 2/47] BSE: add Server.send_user_message() which triggers a user_message signal emissioon
- Date: Sat, 2 Sep 2017 00:42:06 +0000 (UTC)
commit edf9616e0e4bde3f4a209a7822071a193c1d40a9
Author: Tim Janik <timj gnu org>
Date: Sun Jun 4 22:31:12 2017 +0200
BSE: add Server.send_user_message() which triggers a user_message signal emissioon
Signed-off-by: Tim Janik <timj gnu org>
bse/bseapi.idl | 3 ++-
bse/bseserver.cc | 4 ++--
bse/bseserver.hh | 2 +-
3 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/bse/bseapi.idl b/bse/bseapi.idl
index 8573614..d987d29 100644
--- a/bse/bseapi.idl
+++ b/bse/bseapi.idl
@@ -959,7 +959,8 @@ sequence CategorySeq {
* used in the BSE context.
*/
interface Server : Object {
- signal void user_message (UserMessage umsg); ///< Notification signal for user messages from BSE.
+ signal void user_message (UserMessage umsg); ///< Notification signal for user messages from BSE.
+ void send_user_message (UserMessage umsg); ///< Send a user messages from BSE.
TestObject get_test_object (); ///< Retrieve object for API, signal, etc tests.
Object from_proxy (int64 proxyid); ///< Find an Object from its associated BseObject
proxy id.
String get_mp3_version (); ///< Retrieve BSE MP3 handler version.
diff --git a/bse/bseserver.cc b/bse/bseserver.cc
index c2e7775..c9870a5 100644
--- a/bse/bseserver.cc
+++ b/bse/bseserver.cc
@@ -1138,8 +1138,8 @@ ServerImpl::instance()
void
ServerImpl::send_user_message (const UserMessage &umsg)
{
- assert_return (umsg.text1.empty() == false);
- sig_user_message.emit (umsg);
+ if (!umsg.text1.empty())
+ sig_user_message.emit (umsg);
}
String
diff --git a/bse/bseserver.hh b/bse/bseserver.hh
index 92b831a..adb9dcc 100644
--- a/bse/bseserver.hh
+++ b/bse/bseserver.hh
@@ -138,7 +138,7 @@ public:
virtual CategorySeq category_match_typed (const String &pattern, const String &type_name) override;
virtual CategorySeq category_match (const String &pattern) override;
virtual int64 tick_stamp_from_systime (int64 systime_usecs) override;
- void send_user_message (const UserMessage &umsg);
+ virtual void send_user_message (const UserMessage &umsg) override;
static void register_source_module (const String &type, const String &title, const String &tags,
const uint8 *pixstream);
static ServerImpl& instance ();
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]