tizen 2.4 release
[profile/mobile/platform/kernel/linux-3.10-sc7730.git] / tools / gator / daemon / UserSpaceSource.h
1 /**
2  * Copyright (C) ARM Limited 2010-2014. All rights reserved.
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation.
7  */
8
9 #ifndef USERSPACESOURCE_H
10 #define USERSPACESOURCE_H
11
12 #include <semaphore.h>
13
14 #include "Buffer.h"
15 #include "Source.h"
16
17 // User space counters
18 class UserSpaceSource : public Source {
19 public:
20         UserSpaceSource(sem_t *senderSem);
21         ~UserSpaceSource();
22
23         bool prepare();
24         void run();
25         void interrupt();
26
27         bool isDone();
28         void write(Sender *sender);
29
30 private:
31         Buffer mBuffer;
32
33         // Intentionally unimplemented
34         UserSpaceSource(const UserSpaceSource &);
35         UserSpaceSource &operator=(const UserSpaceSource &);
36 };
37
38 #endif // USERSPACESOURCE_H