From bd9d1df3a00fe5bb03cb1941d3b7cfdc659294e0 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Thu, 16 Jun 2011 19:12:46 +0200 Subject: [PATCH] Added very simple BLooper class to libbe_build. --- headers/build/os/app/Looper.h | 29 ++++++++++++++++++++++++++++- src/build/libbe/app/Jamfile | 1 + src/build/libbe/app/Looper.cpp | 12 ++++++++++++ 3 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 src/build/libbe/app/Looper.cpp diff --git a/headers/build/os/app/Looper.h b/headers/build/os/app/Looper.h index 945f37a455..dd446ca359 100644 --- a/headers/build/os/app/Looper.h +++ b/headers/build/os/app/Looper.h @@ -1 +1,28 @@ -#include <../os/app/Looper.h> +/* + * Copyright 2011, Haiku, Inc. All Rights Reserved. + * Distributed under the terms of the MIT License. + */ +#ifndef _LOOPER_H +#define _LOOPER_H + + +#include + + +// Port (Message Queue) Capacity +#define B_LOOPER_PORT_DEFAULT_CAPACITY 200 + + +class BLooper { +public: + BLooper(const char* name = NULL, + int32 priority = B_NORMAL_PRIORITY, + int32 port_capacity + = B_LOOPER_PORT_DEFAULT_CAPACITY); + + bool Lock() { return true; } + void Unlock() {} +}; + + +#endif // _LOOPER_H diff --git a/src/build/libbe/app/Jamfile b/src/build/libbe/app/Jamfile index 59459946c2..337083dd08 100644 --- a/src/build/libbe/app/Jamfile +++ b/src/build/libbe/app/Jamfile @@ -9,6 +9,7 @@ USES_BE_API on app_kit.o = true ; BuildPlatformMergeObjectPIC app_kit.o : Application.cpp AppMisc.cpp + Looper.cpp Message.cpp MessageAdapter.cpp Messenger.cpp diff --git a/src/build/libbe/app/Looper.cpp b/src/build/libbe/app/Looper.cpp new file mode 100644 index 0000000000..52254879a1 --- /dev/null +++ b/src/build/libbe/app/Looper.cpp @@ -0,0 +1,12 @@ +/* + * Copyright 2011, Ingo Weinhold, ingo_weinhold@gmx.de. + * Distributed under the terms of the MIT License. + */ + + +#include + + +BLooper::BLooper(const char* name, int32 priority, int32 port_capacity) +{ +}