Wed, 31 Dec 2014 13:27:57 +0100
Ignore runtime configuration files generated during quality assurance.
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim:set ts=2 sw=2 sts=2 et cindent: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
5 * You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef ANDROID_MEDIARESOURCEMANAGERCLIENT_H
8 #define ANDROID_MEDIARESOURCEMANAGERCLIENT_H
10 #include "IMediaResourceManagerClient.h"
11 #include "IMediaResourceManagerDeathNotifier.h"
13 namespace android {
15 class MediaResourceManagerClient: public BnMediaResourceManagerClient,
16 public virtual IMediaResourceManagerDeathNotifier
17 {
18 public:
19 // Enumeration for the valid decoding states
20 enum State {
21 CLIENT_STATE_WAIT_FOR_RESOURCE,
22 CLIENT_STATE_RESOURCE_ASSIGNED,
23 CLIENT_STATE_SHUTDOWN
24 };
25 // Enumeration for the resource types
26 enum ResourceType {
27 HW_VIDEO_DECODER,
28 HW_AUDIO_DECODER,
29 HW_CAMERA
30 };
32 struct EventListener : public virtual RefBase {
33 // Notifies a change of media resource request status.
34 virtual void statusChanged(int event) = 0;
35 };
37 MediaResourceManagerClient(const wp<EventListener>& listener);
39 // DeathRecipient
40 void died();
42 // IMediaResourceManagerClient
43 virtual void statusChanged(int event);
45 private:
46 wp<EventListener> mEventListener;
47 };
49 }; // namespace android
51 #endif // ANDROID_IMEDIARESOURCEMANAGERCLIENT_H