2 * Copyright 2001-2014 Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
6 * Erik Jaesler (erik@cgsoftware.com)
10 #include <MessageFilter.h>
13 BMessageFilter::BMessageFilter(uint32 inWhat
, filter_hook func
)
17 fDelivery(B_ANY_DELIVERY
),
18 fSource(B_ANY_SOURCE
),
25 BMessageFilter::BMessageFilter(message_delivery delivery
,
26 message_source source
, filter_hook func
)
38 BMessageFilter::BMessageFilter(message_delivery delivery
,
39 message_source source
, uint32 inWhat
, filter_hook func
)
51 BMessageFilter::BMessageFilter(const BMessageFilter
& filter
)
57 BMessageFilter::BMessageFilter(const BMessageFilter
* filter
)
63 BMessageFilter::~BMessageFilter()
69 BMessageFilter::operator=(const BMessageFilter
& from
)
71 fFiltersAny
= from
.FiltersAnyCommand();
72 fWhat
= from
.Command();
73 fDelivery
= from
.MessageDelivery();
74 fSource
= from
.MessageSource();
75 fFilterFunction
= from
.FilterFunction();
77 SetLooper(from
.Looper());
84 BMessageFilter::Filter(BMessage
* message
, BHandler
** target
)
86 return B_DISPATCH_MESSAGE
;
91 BMessageFilter::MessageDelivery() const
98 BMessageFilter::MessageSource() const
105 BMessageFilter::Command() const
112 BMessageFilter::FiltersAnyCommand() const
119 BMessageFilter::Looper() const
125 void BMessageFilter::_ReservedMessageFilter1() {}
126 void BMessageFilter::_ReservedMessageFilter2() {}
130 BMessageFilter::SetLooper(BLooper
* owner
)
137 BMessageFilter::FilterFunction() const
139 return fFilterFunction
;