rk: temp revert rk change
[firefly-linux-kernel-4.4.55.git] / tools / gator / daemon / ExternalSource.h
index 2052bdf2823e39dcf651fa25c4282c8e4ea4f062..25ae7cd4c4ab32f9a37168a9cf4ebe0dca2beff2 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * Copyright (C) ARM Limited 2010-2014. All rights reserved.
+ * Copyright (C) ARM Limited 2010-2015. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
 #include <semaphore.h>
 
 #include "Buffer.h"
+#include "Monitor.h"
 #include "OlySocket.h"
 #include "Source.h"
 
-// Unix domain socket counters from external sources like graphics drivers
+// Counters from external sources like graphics drivers and annotations
 class ExternalSource : public Source {
 public:
        ExternalSource(sem_t *senderSem);
@@ -29,8 +30,21 @@ public:
        void write(Sender *sender);
 
 private:
+       void waitFor(const int bytes);
+       void configureConnection(const int fd, const char *const handshake, size_t size);
+       bool connectMali();
+       bool connectMve();
+
+       sem_t mBufferSem;
        Buffer mBuffer;
-       OlySocket mSock;
+       Monitor mMonitor;
+       OlyServerSocket mMveStartupUds;
+       OlyServerSocket mMaliStartupUds;
+       OlyServerSocket mAnnotate;
+       OlyServerSocket mAnnotateUds;
+       int mInterruptFd;
+       int mMaliUds;
+       int mMveUds;
 
        // Intentionally unimplemented
        ExternalSource(const ExternalSource &);