Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3ef35e4b authored by Henry Fang's avatar Henry Fang Committed by Android (Google) Code Review
Browse files

Merge "Revert "Revert "Add plugin API to use cas@1.1 new interface"""

parents b5b0f66c fc2d0de0
Loading
Loading
Loading
Loading
+24 −1
Original line number Diff line number Diff line
@@ -48,6 +48,14 @@ typedef void (*CasPluginCallback)(
        uint8_t *data,
        size_t size);

typedef void (*CasPluginCallbackExt)(
        void *appData,
        int32_t event,
        int32_t arg,
        uint8_t *data,
        size_t size,
        const CasSessionId *sessionId);

struct CasFactory {
    CasFactory() {}
    virtual ~CasFactory() {}
@@ -67,6 +75,13 @@ struct CasFactory {
            CasPluginCallback callback,
            CasPlugin **plugin) = 0;

    // Construct a new extend instance of a CasPlugin given a CA_system_id
    virtual status_t createPlugin(
            int32_t CA_system_id,
            void *appData,
            CasPluginCallbackExt callback,
            CasPlugin **plugin) = 0;

private:
    CasFactory(const CasFactory &);
    CasFactory &operator=(const CasFactory &); /* NOLINT */
@@ -110,6 +125,14 @@ struct CasPlugin {
            int32_t arg,
            const CasData &eventData) = 0;

    // Deliver an session event to the CasPlugin. The format of the event is
    // specific to the CA scheme and is opaque to the framework.
    virtual status_t sendSessionEvent(
            const CasSessionId &sessionId,
            int32_t event,
            int32_t arg,
            const CasData &eventData) = 0;

   // Native implementation of the MediaCas Java API provision method.
    virtual status_t provision(
            const String8 &provisionString) = 0;