Merge tag 'v3.10.61' into linux-linaro-lsk
[firefly-linux-kernel-4.4.55.git] / tools / gator / daemon / NetDriver.h
1 /**
2  * Copyright (C) ARM Limited 2013-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 NETDRIVER_H
10 #define NETDRIVER_H
11
12 #include "Driver.h"
13 #include "DynBuf.h"
14
15 class NetDriver : public PolledDriver {
16 private:
17         typedef PolledDriver super;
18
19 public:
20         NetDriver();
21         ~NetDriver();
22
23         void readEvents(mxml_node_t *const root);
24         void start();
25         void read(Buffer *const buffer);
26
27 private:
28         bool doRead();
29
30         DynBuf mBuf;
31         int64_t mReceiveBytes;
32         int64_t mTransmitBytes;
33
34         // Intentionally unimplemented
35         NetDriver(const NetDriver &);
36         NetDriver &operator=(const NetDriver &);
37 };
38
39 #endif // NETDRIVER_H