33 #include "trm/Klass.h"
56 releaseTunerReservation,
57 releaseTunerReservationResponse,
59 validateTunerReservation,
60 validateTunerReservationResponse,
63 cancelRecordingResponse,
69 getAllTunerIdsResponse,
71 getAllTunerStatesResponse,
73 getAllReservationsResponse,
76 getAllConnectedDeviceIdsResponse,
78 notifyTunerReservationUpdate,
79 notifyTunerReservationRelease,
80 notifyTunerReservationConflict,
81 notifyTunerStatesUpdate,
83 notifyClientConnectionEvent,
85 getTRMConnectionEvents,
86 updateTunerActivityStatus,
87 updateTunerActivityStatusResponse,
96 const Enum<Klass> Klass::kUnknown (MAKE_PAIR(unknown));
97 const Enum<Klass> Klass::kDetails (MAKE_PAIR(details));
98 const Enum<Klass> Klass::kActivity (MAKE_PAIR(activity));
99 const Enum<Klass> Klass::kTunerReservation (MAKE_PAIR(tunerReservation));
100 const Enum<Klass> Klass::kTunerState (MAKE_PAIR(tunerState));
101 const Enum<Klass> Klass::kResponseStatus (MAKE_PAIR(responseStatus));
103 const Enum<Klass> Klass::kMessageBase (MAKE_PAIR(messageBase));
104 const Enum<Klass> Klass::kNoResponse (MAKE_PAIR(noResponse));
105 const Enum<Klass> Klass::kRequestBase (MAKE_PAIR(requestBase));
106 const Enum<Klass> Klass::kResponseBase (MAKE_PAIR(responseBase));
107 const Enum<Klass> Klass::kNotificationBase (MAKE_PAIR(notificationBase));
108 const Enum<Klass> Klass::kSimpleTRMRequest (MAKE_PAIR(simpleTRMRequest));
109 const Enum<Klass> Klass::kSimpleTRMResponse (MAKE_PAIR(simpleTRMResponse));
111 const Enum<Klass> Klass::kReserveTuner (MAKE_PAIR(reserveTuner));
112 const Enum<Klass> Klass::kReserveTunerResponse (MAKE_PAIR(reserveTunerResponse));
114 const Enum<Klass> Klass::kReleaseTunerReservation (MAKE_PAIR(releaseTunerReservation));
115 const Enum<Klass> Klass::kReleaseTunerReservationResponse (MAKE_PAIR(releaseTunerReservationResponse));
117 const Enum<Klass> Klass::kValidateTunerReservation (MAKE_PAIR(validateTunerReservation));
118 const Enum<Klass> Klass::kValidateTunerReservationResponse (MAKE_PAIR(validateTunerReservationResponse));
120 const Enum<Klass> Klass::kCancelRecording (MAKE_PAIR(cancelRecording));
121 const Enum<Klass> Klass::kCancelRecordingResponse (MAKE_PAIR(cancelRecordingResponse));
123 const Enum<Klass> Klass::kCancelLive (MAKE_PAIR(cancelLive));
124 const Enum<Klass> Klass::kCancelLiveResponse (MAKE_PAIR(cancelLiveResponse));
126 const Enum<Klass> Klass::kGetAllTunerIds (MAKE_PAIR(getAllTunerIds));
127 const Enum<Klass> Klass::kGetAllTunerIdsResponse (MAKE_PAIR(getAllTunerIdsResponse));
128 const Enum<Klass> Klass::kGetAllTunerStates (MAKE_PAIR(getAllTunerStates));
129 const Enum<Klass> Klass::kGetAllTunerStatesResponse (MAKE_PAIR(getAllTunerStatesResponse));
130 const Enum<Klass> Klass::kGetAllReservations (MAKE_PAIR(getAllReservations));
131 const Enum<Klass> Klass::kGetAllReservationsResponse (MAKE_PAIR(getAllReservationsResponse));
132 const Enum<Klass> Klass::kGetVersion (MAKE_PAIR(getVersion));
133 const Enum<Klass> Klass::kGetVersionResponse (MAKE_PAIR(getVersionResponse));
135 const Enum<Klass> Klass::kGetAllConnectedDeviceIdsResponse (MAKE_PAIR(getAllConnectedDeviceIdsResponse));
138 const Enum<Klass> Klass::kNotifyTunerReservationUpdate (MAKE_PAIR(notifyTunerReservationUpdate));
139 const Enum<Klass> Klass::kNotifyTunerReservationRelease (MAKE_PAIR(notifyTunerReservationRelease));
140 const Enum<Klass> Klass::kNotifyTunerReservationConflicts (MAKE_PAIR(notifyTunerReservationConflict));
141 const Enum<Klass> Klass::kNotifyTunerStatesUpdate (MAKE_PAIR(notifyTunerStatesUpdate));
142 const Enum<Klass> Klass::kNotifyTunerPretune (MAKE_PAIR(notifyTunerPretune));
143 const Enum<Klass> Klass::kNotifyClientConnectionEvent (MAKE_PAIR(notifyClientConnectionEvent));
145 const Enum<Klass> Klass::kGetTRMConnectionEvents (MAKE_PAIR(getTRMConnectionEvents));
146 const Enum<Klass> Klass::kUpdateTunerActivityStatus (MAKE_PAIR(updateTunerActivityStatus));
147 const Enum<Klass> Klass::kUpdateTunerActivityStatusResponse (MAKE_PAIR(updateTunerActivityStatusResponse));
150 const std::vector<const Enum<Klass> * > & Klass::getEnums(
void)
152 static std::vector<const Enum<Klass> * > enums_;
153 if (enums_.size() == 0) {
154 enums_.push_back(&Klass::kUnknown);
155 enums_.push_back(&Klass::kDetails);
156 enums_.push_back(&Klass::kActivity);
157 enums_.push_back(&Klass::kTunerReservation);
158 enums_.push_back(&Klass::kTunerState);
159 enums_.push_back(&Klass::kResponseStatus);
161 enums_.push_back(&Klass::kMessageBase);
162 enums_.push_back(&Klass::kNoResponse);
163 enums_.push_back(&Klass::kRequestBase);
164 enums_.push_back(&Klass::kResponseBase);
165 enums_.push_back(&Klass::kNotificationBase);
166 enums_.push_back(&Klass::kSimpleTRMRequest);
167 enums_.push_back(&Klass::kSimpleTRMResponse);
169 enums_.push_back(&Klass::kReserveTuner);
170 enums_.push_back(&Klass::kReserveTunerResponse);
172 enums_.push_back(&Klass::kReleaseTunerReservation);
173 enums_.push_back(&Klass::kReleaseTunerReservationResponse);
175 enums_.push_back(&Klass::kValidateTunerReservation);
176 enums_.push_back(&Klass::kValidateTunerReservationResponse);
178 enums_.push_back(&Klass::kCancelRecording);
179 enums_.push_back(&Klass::kCancelRecordingResponse);
181 enums_.push_back(&Klass::kCancelLive);
182 enums_.push_back(&Klass::kCancelLiveResponse);
184 enums_.push_back(&Klass::kGetAllTunerIds);
185 enums_.push_back(&Klass::kGetAllTunerIdsResponse);
187 enums_.push_back(&Klass::kGetAllTunerStates);
188 enums_.push_back(&Klass::kGetAllTunerStatesResponse);
190 enums_.push_back(&Klass::kGetAllReservations);
191 enums_.push_back(&Klass::kGetAllReservationsResponse);
193 enums_.push_back(&Klass::kGetAllConnectedDeviceIdsResponse);
196 enums_.push_back(&Klass::kGetVersion);
197 enums_.push_back(&Klass::kGetVersionResponse);
199 enums_.push_back(&Klass::kNotifyTunerReservationUpdate);
200 enums_.push_back(&Klass::kNotifyTunerReservationRelease);
201 enums_.push_back(&Klass::kNotifyTunerReservationConflicts);
202 enums_.push_back(&Klass::kNotifyTunerStatesUpdate);
203 enums_.push_back(&Klass::kNotifyTunerPretune);
204 enums_.push_back(&Klass::kNotifyClientConnectionEvent);
206 enums_.push_back(&Klass::kGetTRMConnectionEvents);
208 enums_.push_back(&Klass::kUpdateTunerActivityStatus);
209 enums_.push_back(&Klass::kUpdateTunerActivityStatusResponse);
211 Assert(enums_.size() == MAX_ENUM_NUMBER);
217 Klass::Klass(
const Enum<Klass> &klass)
222 Klass::Klass(
const char *name)
223 : klass(Enum<Klass>::at(name))