haiku/headers/private/app/AppMisc.h
Axel Dörfler ec1bcf6243 * Added private methods get_app_server_port() (that stores the server port,
and doesn't have to find it every time), and create_desktop_connection() that
  is now used from BApplication::_ConnectToServer() as well as the DesktopLink.
* Move PortLink::SetTo() into base class ServerLink.
* Eliminated duplicated member fReplyPort in DesktopLink.
* Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34397 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-01 07:53:09 +00:00

49 lines
1011 B
C++

/*
* Copyright 2002-2009, Ingo Weinhold, bonefish@users.sf.net.
* Distributed under the terms of the MIT License.
*/
#ifndef _APP_MISC_H
#define _APP_MISC_H
#include <Handler.h>
#include <Locker.h>
#include <OS.h>
#include <SupportDefs.h>
struct entry_ref;
namespace BPrivate {
class ServerLink;
status_t get_app_path(team_id team, char *buffer);
status_t get_app_path(char *buffer);
status_t get_app_ref(team_id team, entry_ref *ref, bool traverse = true);
status_t get_app_ref(entry_ref *ref, bool traverse = true);
team_id current_team();
thread_id main_thread_for(team_id team);
bool is_app_showing_modal_window(team_id team);
port_id get_app_server_port();
status_t create_desktop_connection(ServerLink* link, const char* name,
int32 capacity);
} // namespace BPrivate
// _get_object_token_
/*! Return the token of a BHandler.
\param handler The BHandler.
\return the token.
*/
inline int32 _get_object_token_(const BHandler* object)
{ return object->fToken; }
#endif // _APP_MISC_H