RDK Documentation (Open Sourced RDK Components)
AsyncNotification.h
1
/*
2
* If not stated otherwise in this file or this component's Licenses.txt file the
3
* following copyright and licenses apply:
4
*
5
* Copyright 2016 RDK Management
6
*
7
* Licensed under the Apache License, Version 2.0 (the "License");
8
* you may not use this file except in compliance with the License.
9
* You may obtain a copy of the License at
10
*
11
* http://www.apache.org/licenses/LICENSE-2.0
12
*
13
* Unless required by applicable law or agreed to in writing, software
14
* distributed under the License is distributed on an "AS IS" BASIS,
15
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
* See the License for the specific language governing permissions and
17
* limitations under the License.
18
*/
19
20
21
/**
22
* @defgroup trm
23
* @{
24
* @defgroup common
25
* @{
26
**/
27
28
29
#ifndef TRM_ASYNC_OBSERVER_H_
30
#define TRM_ASYNC_OBSERVER_H_
31
32
#include <iostream>
33
34
#include "TRM.h"
35
#include "
Messages.h
"
36
37
TRM_BEGIN_NAMESPACE
38
39
class
AsyncObserver
40
{
41
public
:
42
AsyncObserver
(
void
) {}
43
44
virtual
void
operator() (
const
NotifyTunerReservationRelease
&msg) {process(msg);}
45
virtual
void
operator() (
const
NotifyTunerReservationConflicts
&msg){process(msg);}
46
47
virtual
~
AsyncObserver
(
void
) {}
48
49
private
:
50
51
template
<
class
MsgT>
52
void
process(
const
MsgT &msg) {
53
/* Default Implementation */
54
msg.print();
55
}
56
57
};
58
59
TRM_END_NAMESPACE
60
#endif
61
62
63
/** @} */
64
/** @} */
TRM::AsyncObserver
Definition:
AsyncNotification.h:39
TRM::NotifyTunerReservationConflicts
Class for implementing asynchronous notification from TRM to the owner of a token that a tuner reserv...
Definition:
Messages.h:1945
Messages.h
TRM::NotifyTunerReservationRelease
Class to implement asynchronous Notification from TRM to the owner of a token that its tuner reservat...
Definition:
Messages.h:1845
components
generic
trm
common
include
trm
AsyncNotification.h
Generated on Thu Feb 9 2023 06:32:35 for RDK Documentation (Open Sourced RDK Components) by
1.8.17