Camera service: Add skeleton support for camera2 devices.

- Add Camera2Client, which maps the current android.hardware.Camera
  API to the new camera2 semantics
- Add Camera2Device, a C++ wrapper for the HAL camera 2 device

No functionality besides create/destroy; all client methods return
error or null.

Bug: 6243944
Change-Id: I6bd5136fa1efd8279b8cd2d9847d9b0bb2862294
diff --git a/services/camera/libcameraservice/Camera2Client.h b/services/camera/libcameraservice/Camera2Client.h
new file mode 100644
index 0000000..709de0b
--- /dev/null
+++ b/services/camera/libcameraservice/Camera2Client.h
@@ -0,0 +1,73 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_SERVERS_CAMERA_CAMERA2CLIENT_H
+#define ANDROID_SERVERS_CAMERA_CAMERA2CLIENT_H
+
+#include "Camera2Device.h"
+#include "CameraService.h"
+
+namespace android {
+
+/**
+ * Implements the android.hardware.camera API on top of
+ * camera device HAL version 2.
+ */
+class Camera2Client : public CameraService::Client
+{
+public:
+    // ICamera interface (see ICamera for details)
+    virtual void            disconnect();
+    virtual status_t        connect(const sp<ICameraClient>& client);
+    virtual status_t        lock();
+    virtual status_t        unlock();
+    virtual status_t        setPreviewDisplay(const sp<Surface>& surface);
+    virtual status_t        setPreviewTexture(const sp<ISurfaceTexture>& surfaceTexture);
+    virtual void            setPreviewCallbackFlag(int flag);
+    virtual status_t        startPreview();
+    virtual void            stopPreview();
+    virtual bool            previewEnabled();
+    virtual status_t        storeMetaDataInBuffers(bool enabled);
+    virtual status_t        startRecording();
+    virtual void            stopRecording();
+    virtual bool            recordingEnabled();
+    virtual void            releaseRecordingFrame(const sp<IMemory>& mem);
+    virtual status_t        autoFocus();
+    virtual status_t        cancelAutoFocus();
+    virtual status_t        takePicture(int msgType);
+    virtual status_t        setParameters(const String8& params);
+    virtual String8         getParameters() const;
+    virtual status_t        sendCommand(int32_t cmd, int32_t arg1, int32_t arg2);
+
+    // Interface used by CameraService
+    Camera2Client(const sp<CameraService>& cameraService,
+            const sp<ICameraClient>& cameraClient,
+            const sp<Camera2Device>& device,
+            int cameraId,
+            int cameraFacing,
+            int clientPid);
+    ~Camera2Client();
+
+    virtual status_t dump(int fd, const Vector<String16>& args);
+
+private:
+
+
+};
+
+}; // namespace android
+
+#endif