1/*
2 * Copyright 2005, Ingo Weinhold, bonefish@users.sf.net.
3 * Distributed under the terms of the MIT License.
4 *
5 * Implements the MessagingTargetSet interface for AppInfoLists, so that
6 * no other representation (array/list) is needed to feed them into the
7 * MessageDeliverer.
8 */
9#ifndef APP_INFO_LIST_MESSAGING_TARGET_SET_H
10#define APP_INFO_LIST_MESSAGING_TARGET_SET_H
11
12#include "AppInfoList.h"
13#include "MessageDeliverer.h"
14
15struct RosterAppInfo;
16
17class AppInfoListMessagingTargetSet : public MessagingTargetSet {
18public:
19	AppInfoListMessagingTargetSet(AppInfoList &list,
20		bool skipRegistrar = true);
21	virtual ~AppInfoListMessagingTargetSet();
22
23	virtual bool HasNext() const;
24	virtual bool Next(port_id &port, int32 &token);
25	virtual void Rewind();
26
27	virtual bool Filter(const RosterAppInfo *info);
28
29private:
30	void _SkipFilteredOutInfos();
31
32	AppInfoList				&fList;
33	AppInfoList::Iterator	fIterator;
34	bool					fSkipRegistrar;
35};
36
37#endif	// APP_INFO_LIST_MESSAGING_TARGET_SET_H
38