Unimplemented ActivateApp(); it has to ask the app server instead. Moved its code to UpdateActiveApp(), which has exactly the matching semantics. :-)
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3053 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
47b0fc0ee3
commit
c99847b4cd
@ -742,19 +742,7 @@ BRoster::StopWatching(BMessenger target) const
|
||||
status_t
|
||||
BRoster::ActivateApp(team_id team) const
|
||||
{
|
||||
status_t error = (team >= 0 ? B_OK : B_BAD_TEAM_ID);
|
||||
// compose the request message
|
||||
BMessage request(B_REG_ACTIVATE_APP);
|
||||
if (error == B_OK)
|
||||
error = request.AddInt32("team", team);
|
||||
// send the request
|
||||
BMessage reply;
|
||||
if (error == B_OK)
|
||||
error = fMess.SendMessage(&request, &reply);
|
||||
// evaluate the reply
|
||||
if (error == B_OK && reply.what != B_REG_SUCCESS)
|
||||
reply.FindInt32("error", &error);
|
||||
return error;
|
||||
return B_ERROR; // not implemented
|
||||
}
|
||||
|
||||
// Launch
|
||||
@ -1744,10 +1732,32 @@ DBG(OUT("BRoster::xLaunchAppPrivate() done: %s (%lx)\n", strerror(error), error)
|
||||
}
|
||||
|
||||
// UpdateActiveApp
|
||||
/*! \brief Tells the registrar that a certain team is active now.
|
||||
|
||||
It doesn't matter, if the application is already active. In that case,
|
||||
the registrar does nothing. Otherwise, the previously active application
|
||||
is notified, that it is no longer active now, the now active application
|
||||
is notified, that it is active now, and all watchers are notified, too.
|
||||
|
||||
\param team The app's team ID.
|
||||
\return \c true, if everything went fine, \c false, if an error occured.
|
||||
*/
|
||||
bool
|
||||
BRoster::UpdateActiveApp(team_id team) const
|
||||
{
|
||||
return false; // not implemented
|
||||
status_t error = (team >= 0 ? B_OK : B_BAD_TEAM_ID);
|
||||
// compose the request message
|
||||
BMessage request(B_REG_ACTIVATE_APP);
|
||||
if (error == B_OK)
|
||||
error = request.AddInt32("team", team);
|
||||
// send the request
|
||||
BMessage reply;
|
||||
if (error == B_OK)
|
||||
error = fMess.SendMessage(&request, &reply);
|
||||
// evaluate the reply
|
||||
if (error == B_OK && reply.what != B_REG_SUCCESS)
|
||||
reply.FindInt32("error", &error);
|
||||
return (error == B_OK);
|
||||
}
|
||||
|
||||
// SetAppFlags
|
||||
|
Loading…
Reference in New Issue
Block a user