vfs: check userland buffers before reading them.
[haiku.git] / src / servers / registrar / AppInfoListMessagingTargetSet.h
blobda56dc3d2648c3a53d9814674a48953e3205237f
1 /*
2 * Copyright 2005, Ingo Weinhold, bonefish@users.sf.net.
3 * Distributed under the terms of the MIT License.
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
12 #include "AppInfoList.h"
13 #include "MessageDeliverer.h"
15 class RosterAppInfo;
17 class AppInfoListMessagingTargetSet : public MessagingTargetSet {
18 public:
19 AppInfoListMessagingTargetSet(AppInfoList &list,
20 bool skipRegistrar = true);
21 virtual ~AppInfoListMessagingTargetSet();
23 virtual bool HasNext() const;
24 virtual bool Next(port_id &port, int32 &token);
25 virtual void Rewind();
27 virtual bool Filter(const RosterAppInfo *info);
29 private:
30 void _SkipFilteredOutInfos();
32 AppInfoList &fList;
33 AppInfoList::Iterator fIterator;
34 bool fSkipRegistrar;
37 #endif // APP_INFO_LIST_MESSAGING_TARGET_SET_H