implement connect/disconnect in our native_window_t implementations

the framebuffer implementation doesn't do anything special with this
but the surfaceflinger implementation makes sure the surface is not used
by two APIs simultaneously.

Change-Id: Id4ca8ef7093d68846abc2ac814327cc40a64b66b
diff --git a/include/surfaceflinger/Surface.h b/include/surfaceflinger/Surface.h
index 9808832..0279d84 100644
--- a/include/surfaceflinger/Surface.h
+++ b/include/surfaceflinger/Surface.h
@@ -210,9 +210,16 @@
 
     status_t dequeueBuffer(sp<GraphicBuffer>* buffer);
 
+    void dispatch_setUsage(va_list args);
+    int  dispatch_connect(va_list args);
+    int  dispatch_disconnect(va_list args);
     
     void setUsage(uint32_t reqUsage);
+    int  connect(int api);
+    int  disconnect(int api);
+
     uint32_t getUsage() const;
+    int      getConnectedApi() const;
     
     // constants
     sp<SurfaceComposerClient>   mClient;
@@ -227,6 +234,7 @@
     // protected by mSurfaceLock
     Rect                        mSwapRectangle;
     uint32_t                    mUsage;
+    int                         mConnected;
     
     // protected by mSurfaceLock. These are also used from lock/unlock
     // but in that case, they must be called form the same thread.