haiku/src/servers/registrar/AppInfoListMessagingTargetSet.h
Ingo Weinhold 553ea30124 * Moved TRoster out of the BPrivate namespace. It does no longer appear in
any public header.
* Replaced a good deal of the MessageDeliverer's DeliverMessage() versions
  by more general ones using the new interface MessagingTargetSet to represent
  a set of targets. This simplifies the usage in cases where the caller doesn't
  already have the targets in a supported representation.
* Implemented a first approximation of the shutdown process. There is no
  GUI yet. Only superficially tested under R5.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13417 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-03 17:17:40 +00:00

38 lines
982 B
C++

/*
* Copyright 2005, Ingo Weinhold, bonefish@users.sf.net.
* Distributed under the terms of the MIT License.
*
* Implements the MessagingTargetSet interface for AppInfoLists, so that
* no other representation (array/list) is needed to feed them into the
* MessageDeliverer.
*/
#ifndef APP_INFO_LIST_MESSAGING_TARGET_SET_H
#define APP_INFO_LIST_MESSAGING_TARGET_SET_H
#include "AppInfoList.h"
#include "MessageDeliverer.h"
class RosterAppInfo;
class AppInfoListMessagingTargetSet : public MessagingTargetSet {
public:
AppInfoListMessagingTargetSet(AppInfoList &list,
bool skipRegistrar = true);
virtual ~AppInfoListMessagingTargetSet();
virtual bool HasNext() const;
virtual bool Next(port_id &port, int32 &token);
virtual void Rewind();
virtual bool Filter(const RosterAppInfo *info);
private:
void _SkipFilteredOutInfos();
AppInfoList &fList;
AppInfoList::Iterator fIterator;
bool fSkipRegistrar;
};
#endif // APP_INFO_LIST_MESSAGING_TARGET_SET_H