11fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce/*
21fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce * Copyright (C) 2014 The Android Open Source Project
31fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce *
41fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce * Licensed under the Apache License, Version 2.0 (the "License");
51fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce * you may not use this file except in compliance with the License.
61fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce * You may obtain a copy of the License at
71fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce *
81fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce *      http://www.apache.org/licenses/LICENSE-2.0
91fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce *
101fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce * Unless required by applicable law or agreed to in writing, software
111fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce * distributed under the License is distributed on an "AS IS" BASIS,
121fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
131fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce * See the License for the specific language governing permissions and
141fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce * limitations under the License.
151fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce */
161fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce
171fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce#ifndef CLEARKEY_DRM_PLUGIN_H_
181fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce#define CLEARKEY_DRM_PLUGIN_H_
191fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce
201fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce#include <media/drm/DrmAPI.h>
211fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce#include <media/stagefright/foundation/ABase.h>
221fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce#include <media/stagefright/MediaErrors.h>
231fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce#include <utils/Errors.h>
241fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce#include <utils/KeyedVector.h>
251fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce#include <utils/List.h>
261fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce#include <utils/String8.h>
271fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce#include <utils/Vector.h>
281fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce
291fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce#include "SessionLibrary.h"
301fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce#include "Utils.h"
311fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce
321fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Brucenamespace clearkeydrm {
331fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce
341fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruceusing android::KeyedVector;
351fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruceusing android::List;
361fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruceusing android::status_t;
371fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruceusing android::String8;
381fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruceusing android::Vector;
391fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce
401fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruceclass DrmPlugin : public android::DrmPlugin {
411fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Brucepublic:
421fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce    DrmPlugin(SessionLibrary* sessionLibrary)
431fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce            : mSessionLibrary(sessionLibrary) {}
441fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce    virtual ~DrmPlugin() {}
451fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce
461fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce    virtual status_t openSession(Vector<uint8_t>& sessionId);
471fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce
481fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce    virtual status_t closeSession(const Vector<uint8_t>& sessionId);
491fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce
501fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce    virtual status_t getKeyRequest(
511fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce            const Vector<uint8_t>& scope,
521fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce            const Vector<uint8_t>& initData,
531fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce            const String8& initDataType,
541fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce            KeyType keyType,
551fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce            const KeyedVector<String8, String8>& optionalParameters,
561fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce            Vector<uint8_t>& request,
571fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce            String8& defaultUrl);
581fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce
591fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce    virtual status_t provideKeyResponse(
601fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce            const Vector<uint8_t>& scope,
611fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce            const Vector<uint8_t>& response,
621fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce            Vector<uint8_t>& keySetId);
631fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce
641fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce    virtual status_t removeKeys(const Vector<uint8_t>& sessionId) {
651fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce        UNUSED(sessionId);
661fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce        return android::ERROR_DRM_CANNOT_HANDLE;
671fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce    }
681fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce
691fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce    virtual status_t restoreKeys(
701fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce            const Vector<uint8_t>& sessionId,
711fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce            const Vector<uint8_t>& keySetId) {
721fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce        UNUSED(sessionId);
731fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce        UNUSED(keySetId);
741fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce        return android::ERROR_DRM_CANNOT_HANDLE;
751fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce    }
761fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce
771fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce    virtual status_t queryKeyStatus(
781fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce            const Vector<uint8_t>& sessionId,
791fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce            KeyedVector<String8, String8>& infoMap) const {
801fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce        UNUSED(sessionId);
811fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce        UNUSED(infoMap);
821fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce        return android::ERROR_DRM_CANNOT_HANDLE;
831fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce    }
841fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce
851fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce    virtual status_t getProvisionRequest(
861fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce            const String8& cert_type,
871fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce            const String8& cert_authority,
881fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce            Vector<uint8_t>& request,
891fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce            String8& defaultUrl) {
901fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce        UNUSED(cert_type);
911fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce        UNUSED(cert_authority);
921fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce        UNUSED(request);
931fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce        UNUSED(defaultUrl);
941fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce        return android::ERROR_DRM_CANNOT_HANDLE;
951fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce    }
961fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce
971fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce    virtual status_t provideProvisionResponse(
981fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce            const Vector<uint8_t>& response,
991fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce            Vector<uint8_t>& certificate,
1001fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce            Vector<uint8_t>& wrappedKey) {
1011fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce        UNUSED(response);
1021fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce        UNUSED(certificate);
1031fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce        UNUSED(wrappedKey);
1041fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce        return android::ERROR_DRM_CANNOT_HANDLE;
1051fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce    }
1061fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce
10768b15554f6dca3b056eac517fe5fa2fd4ee80a33Jeff Tinker    virtual status_t unprovisionDevice() {
10868b15554f6dca3b056eac517fe5fa2fd4ee80a33Jeff Tinker        return android::ERROR_DRM_CANNOT_HANDLE;
10968b15554f6dca3b056eac517fe5fa2fd4ee80a33Jeff Tinker    }
11068b15554f6dca3b056eac517fe5fa2fd4ee80a33Jeff Tinker
1111fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce    virtual status_t getSecureStops(List<Vector<uint8_t> >& secureStops) {
1121fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce        UNUSED(secureStops);
1131fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce        return android::ERROR_DRM_CANNOT_HANDLE;
1141fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce    }
1151fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce
1163c1285e8f86bd497e14c14fb6df7b42072ef52bdJeff Tinker    virtual status_t getSecureStop(Vector<uint8_t> const &ssid, Vector<uint8_t> &secureStop) {
1173c1285e8f86bd497e14c14fb6df7b42072ef52bdJeff Tinker        UNUSED(ssid);
1183c1285e8f86bd497e14c14fb6df7b42072ef52bdJeff Tinker        UNUSED(secureStop);
1193c1285e8f86bd497e14c14fb6df7b42072ef52bdJeff Tinker        return android::ERROR_DRM_CANNOT_HANDLE;
1203c1285e8f86bd497e14c14fb6df7b42072ef52bdJeff Tinker    }
1213c1285e8f86bd497e14c14fb6df7b42072ef52bdJeff Tinker
1221fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce    virtual status_t releaseSecureStops(const Vector<uint8_t>& ssRelease) {
1231fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce        UNUSED(ssRelease);
1241fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce        return android::ERROR_DRM_CANNOT_HANDLE;
1251fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce    }
1261fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce
1273c1285e8f86bd497e14c14fb6df7b42072ef52bdJeff Tinker    virtual status_t releaseAllSecureStops() {
1283c1285e8f86bd497e14c14fb6df7b42072ef52bdJeff Tinker        return android::ERROR_DRM_CANNOT_HANDLE;
1293c1285e8f86bd497e14c14fb6df7b42072ef52bdJeff Tinker    }
1303c1285e8f86bd497e14c14fb6df7b42072ef52bdJeff Tinker
1311fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce    virtual status_t getPropertyString(
1321fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce            const String8& name, String8& value) const;
1331fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce
1341fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce    virtual status_t getPropertyByteArray(
1351fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce            const String8& name, Vector<uint8_t>& value) const {
1361fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce        UNUSED(name);
1371fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce        UNUSED(value);
1381fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce        return android::ERROR_DRM_CANNOT_HANDLE;
1391fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce    }
1401fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce
1411fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce    virtual status_t setPropertyString(
1421fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce            const String8& name, const String8& value) {
1431fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce        UNUSED(name);
1441fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce        UNUSED(value);
1451fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce        return android::ERROR_DRM_CANNOT_HANDLE;
1461fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce    }
1471fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce
1481fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce    virtual status_t setPropertyByteArray(
1491fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce            const String8& name, const Vector<uint8_t>& value) {
1501fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce        UNUSED(name);
1511fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce        UNUSED(value);
1521fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce        return android::ERROR_DRM_CANNOT_HANDLE;
1531fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce    }
1541fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce
1551fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce    virtual status_t setCipherAlgorithm(
1561fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce            const Vector<uint8_t>& sessionId, const String8& algorithm) {
1571fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce        UNUSED(sessionId);
1581fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce        UNUSED(algorithm);
1591fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce        return android::ERROR_DRM_CANNOT_HANDLE;
1601fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce    }
1611fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce
1621fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce    virtual status_t setMacAlgorithm(
1631fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce            const Vector<uint8_t>& sessionId, const String8& algorithm) {
1641fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce        UNUSED(sessionId);
1651fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce        UNUSED(algorithm);
1661fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce        return android::ERROR_DRM_CANNOT_HANDLE;
1671fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce    }
1681fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce
1691fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce    virtual status_t encrypt(
1701fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce            const Vector<uint8_t>& sessionId,
1711fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce            const Vector<uint8_t>& keyId,
1721fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce            const Vector<uint8_t>& input,
1731fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce            const Vector<uint8_t>& iv,
1741fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce            Vector<uint8_t>& output) {
1751fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce        UNUSED(sessionId);
1761fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce        UNUSED(keyId);
1771fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce        UNUSED(input);
1781fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce        UNUSED(iv);
1791fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce        UNUSED(output);
1801fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce        return android::ERROR_DRM_CANNOT_HANDLE;
1811fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce    }
1821fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce
1831fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce    virtual status_t decrypt(
1841fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce            const Vector<uint8_t>& sessionId,
1851fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce            const Vector<uint8_t>& keyId,
1861fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce            const Vector<uint8_t>& input,
1871fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce            const Vector<uint8_t>& iv,
1881fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce            Vector<uint8_t>& output) {
1891fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce        UNUSED(sessionId);
1901fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce        UNUSED(keyId);
1911fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce        UNUSED(input);
1921fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce        UNUSED(iv);
1931fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce        UNUSED(output);
1941fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce        return android::ERROR_DRM_CANNOT_HANDLE;
1951fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce    }
1961fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce
1971fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce    virtual status_t sign(
1981fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce            const Vector<uint8_t>& sessionId,
1991fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce            const Vector<uint8_t>& keyId,
2001fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce            const Vector<uint8_t>& message,
2011fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce            Vector<uint8_t>& signature) {
2021fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce        UNUSED(sessionId);
2031fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce        UNUSED(keyId);
2041fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce        UNUSED(message);
2051fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce        UNUSED(signature);
2061fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce        return android::ERROR_DRM_CANNOT_HANDLE;
2071fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce    }
2081fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce
2091fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce    virtual status_t verify(
2101fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce            const Vector<uint8_t>& sessionId,
2111fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce            const Vector<uint8_t>& keyId,
2121fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce            const Vector<uint8_t>& message,
2131fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce            const Vector<uint8_t>& signature, bool& match) {
2141fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce        UNUSED(sessionId);
2151fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce        UNUSED(keyId);
2161fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce        UNUSED(message);
2171fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce        UNUSED(signature);
2181fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce        UNUSED(match);
2191fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce        return android::ERROR_DRM_CANNOT_HANDLE;
2201fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce    }
2211fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce
2221fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce    virtual status_t signRSA(
2231fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce            const Vector<uint8_t>& sessionId,
2241fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce            const String8& algorithm,
2251fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce            const Vector<uint8_t>& message,
2261fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce            const Vector<uint8_t>& wrappedKey,
2271fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce            Vector<uint8_t>& signature) {
2281fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce        UNUSED(sessionId);
2291fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce        UNUSED(algorithm);
2301fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce        UNUSED(message);
2311fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce        UNUSED(wrappedKey);
2321fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce        UNUSED(signature);
2331fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce        return android::ERROR_DRM_CANNOT_HANDLE;
2341fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce    }
2351fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce
2361fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruceprivate:
2371fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce    DISALLOW_EVIL_CONSTRUCTORS(DrmPlugin);
2381fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce
2391fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce    SessionLibrary* mSessionLibrary;
2401fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce};
2411fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce
2421fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce} // namespace clearkeydrm
2431fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce
2441fe11a5d1b7932a8a4a4e6e8cf1aedd21fcdb3aaJohn "Juce" Bruce#endif // CLEARKEY_DRM_PLUGIN_H_
245