(Camera)ProCamera: Remove unused functions from binder interface

Change-Id: I0582268cef6e84b630bc87c8a03dcd69d54c440d
diff --git a/include/camera/CameraBase.h b/include/camera/CameraBase.h
index 2735a86..9b08c0f 100644
--- a/include/camera/CameraBase.h
+++ b/include/camera/CameraBase.h
@@ -91,12 +91,6 @@
     ////////////////////////////////////////////////////////
     virtual void         notifyCallback(int32_t msgType, int32_t ext,
                                         int32_t ext2);
-    virtual void         dataCallback(int32_t msgType,
-                                      const sp<IMemory>& dataPtr,
-                                      camera_frame_metadata *metadata);
-    bool                 dataCallbackTimestamp(nsecs_t timestamp,
-                                               int32_t msgType,
-                                               const sp<IMemory>& dataPtr);
 
     ////////////////////////////////////////////////////////
     // Common instance variables
@@ -115,7 +109,7 @@
 
     const int                        mCameraId;
 
-    typedef CameraBase<TCam>        CameraBaseT;
+    typedef CameraBase<TCam>         CameraBaseT;
 };
 
 }; // namespace android
diff --git a/include/camera/IProCameraCallbacks.h b/include/camera/IProCameraCallbacks.h
index fc24026..563ec17 100644
--- a/include/camera/IProCameraCallbacks.h
+++ b/include/camera/IProCameraCallbacks.h
@@ -28,19 +28,14 @@
 
 namespace android {
 
-class IProCameraCallbacks: public IInterface
+class IProCameraCallbacks : public IInterface
 {
 public:
     DECLARE_META_INTERFACE(ProCameraCallbacks);
 
-    virtual void            notifyCallback(int32_t msgType, int32_t ext1,
-                                                              int32_t ext2) = 0;
-    virtual void            dataCallback(int32_t msgType,
-                                         const sp<IMemory>& data,
-                                         camera_frame_metadata_t *metadata) = 0;
-    virtual void            dataCallbackTimestamp(nsecs_t timestamp,
-                                                  int32_t msgType,
-                                                  const sp<IMemory>& data) = 0;
+    virtual void            notifyCallback(int32_t msgType,
+                                           int32_t ext1,
+                                           int32_t ext2) = 0;
 
     enum LockStatus {
         LOCK_ACQUIRED,
@@ -53,12 +48,13 @@
     /** Missing by design: implementation is client-side in ProCamera.cpp **/
     // virtual void onBufferReceived(int streamId,
     //                               const CpuConsumer::LockedBufer& buf);
-    virtual void onResultReceived(int32_t frameId, camera_metadata* result) = 0;
+    virtual void            onResultReceived(int32_t frameId,
+                                             camera_metadata* result) = 0;
 };
 
 // ----------------------------------------------------------------------------
 
-class BnProCameraCallbacks: public BnInterface<IProCameraCallbacks>
+class BnProCameraCallbacks : public BnInterface<IProCameraCallbacks>
 {
 public:
     virtual status_t    onTransact( uint32_t code,
diff --git a/include/camera/IProCameraUser.h b/include/camera/IProCameraUser.h
index 7bddb0c..45b818c 100644
--- a/include/camera/IProCameraUser.h
+++ b/include/camera/IProCameraUser.h
@@ -61,8 +61,7 @@
                                           bool streaming = false) = 0;
     virtual status_t        cancelRequest(int requestId) = 0;
 
-    virtual status_t        requestStream(int streamId) = 0;
-    virtual status_t        cancelStream(int streamId) = 0;
+    virtual status_t        deleteStream(int streamId) = 0;
     virtual status_t        createStream(
                                       int width, int height, int format,
                                       const sp<IGraphicBufferProducer>& bufferProducer,
diff --git a/include/camera/ProCamera.h b/include/camera/ProCamera.h
index 5d6cfaa..3d1652f 100644
--- a/include/camera/ProCamera.h
+++ b/include/camera/ProCamera.h
@@ -40,9 +40,11 @@
 
 // All callbacks on this class are concurrent
 // (they come from separate threads)
-class ProCameraListener : public CameraListener
+class ProCameraListener : virtual public RefBase
 {
 public:
+    virtual void notify(int32_t msgType, int32_t ext1, int32_t ext2) = 0;
+
     // Lock has been acquired. Write operations now available.
     virtual void onLockAcquired() = 0;
     // Lock has been released with exclusiveUnlock.
@@ -53,19 +55,9 @@
     // Lock free.
     virtual void onTriggerNotify(int32_t msgType, int32_t ext1, int32_t ext2)
                                                                             = 0;
-
-    // OnBufferReceived and OnRequestReceived can come in with any order,
+    // onFrameAvailable and OnResultReceived can come in with any order,
     // use android.sensor.timestamp and LockedBuffer.timestamp to correlate them
 
-    // TODO: remove onBufferReceived
-
-    // A new frame buffer has been received for this stream.
-    // -- This callback only fires for createStreamCpu streams
-    // -- Use buf.timestamp to correlate with metadata's
-    //    android.sensor.timestamp
-    // -- The buffer must not be accessed after this function call completes
-    virtual void onBufferReceived(int streamId,
-                                  const CpuConsumer::LockedBuffer& buf) = 0;
     /**
       * A new metadata buffer has been received.
       * -- Ownership of request passes on to the callee, free with
@@ -77,17 +69,14 @@
 
     // A new frame buffer has been received for this stream.
     // -- This callback only fires for createStreamCpu streams
-    // -- Use buf.timestamp to correlate with metadata's android.sensor.timestamp
+    // -- A buffer may be obtained by calling cpuConsumer->lockNextBuffer
+    // -- Use buf.timestamp to correlate with result's android.sensor.timestamp
     // -- The buffer should be accessed with CpuConsumer::lockNextBuffer
     //      and CpuConsumer::unlockBuffer
     virtual void onFrameAvailable(int /*streamId*/,
                                   const sp<CpuConsumer>& /*cpuConsumer*/) {
     }
 
-    // TODO: Remove useOnFrameAvailable
-    virtual bool useOnFrameAvailable() {
-        return false;
-    }
 };
 
 class ProCamera;
@@ -249,14 +238,10 @@
     ////////////////////////////////////////////////////////
     // IProCameraCallbacks implementation
     ////////////////////////////////////////////////////////
-    virtual void        notifyCallback(int32_t msgType, int32_t ext,
+    virtual void        notifyCallback(int32_t msgType,
+                                       int32_t ext,
                                        int32_t ext2);
-    virtual void        dataCallback(int32_t msgType,
-                                     const sp<IMemory>& dataPtr,
-                                     camera_frame_metadata_t *metadata);
-    virtual void        dataCallbackTimestamp(nsecs_t timestamp,
-                                              int32_t msgType,
-                                              const sp<IMemory>& dataPtr);
+
     virtual void        onLockStatusChanged(
                                 IProCameraCallbacks::LockStatus newLockStatus);