content/media/omx/mediaresourcemanager/IMediaResourceManagerService.h

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

     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_IMEDIARESOURCEMANAGERSERVICE_H
     8 #define ANDROID_IMEDIARESOURCEMANAGERSERVICE_H
    10 #include <utils/RefBase.h>
    11 #include <binder/IInterface.h>
    13 #include "IMediaResourceManagerClient.h"
    16 namespace android {
    18 // ----------------------------------------------------------------------------
    20 class IMediaResourceManagerService : public IInterface
    21 {
    22 public:
    23     DECLARE_META_INTERFACE(MediaResourceManagerService);
    25     // Request a media resource for IMediaResourceManagerClient.
    26     virtual void requestMediaResource(const sp<IMediaResourceManagerClient>& client, int resourceType) = 0;
    27     // Cancel a media resource request and a resource allocated to IMediaResourceManagerClient.
    28     virtual status_t cancelClient(const sp<IMediaResourceManagerClient>& client) = 0;
    29 };
    32 // ----------------------------------------------------------------------------
    34 class BnMediaResourceManagerService : public BnInterface<IMediaResourceManagerService>
    35 {
    36 public:
    37     virtual status_t    onTransact( uint32_t code,
    38                                     const Parcel& data,
    39                                     Parcel* reply,
    40                                     uint32_t flags = 0);
    41 };
    43 // ----------------------------------------------------------------------------
    45 }; // namespace android
    47 #endif // ANDROID_IMEDIARESOURCEMANAGERSERVICE_H

mercurial