niklase@google.com | 77ae29b | 2011-05-30 11:22:19 +0000 | [diff] [blame] | 1 | #ifndef MODULE_H |
| 2 | #define MODULE_H |
| 3 | |
| 4 | #include "typedefs.h" |
| 5 | |
| 6 | namespace webrtc |
| 7 | { |
| 8 | |
| 9 | class Module |
| 10 | { |
| 11 | public: |
| 12 | // Returns version of the module and its components. |
| 13 | virtual int32_t Version(char* version, |
| 14 | uint32_t& remainingBufferInBytes, |
| 15 | uint32_t& position) const = 0; |
| 16 | |
| 17 | // Change the unique identifier of this object. |
| 18 | virtual int32_t ChangeUniqueId(const int32_t id) = 0; |
| 19 | |
| 20 | // Returns the number of milliseconds until the module want a worker |
| 21 | // thread to call Process. |
| 22 | virtual int32_t TimeUntilNextProcess() = 0 ; |
| 23 | |
| 24 | // Process any pending tasks such as timeouts. |
| 25 | virtual int32_t Process() = 0 ; |
| 26 | |
| 27 | protected: |
| 28 | virtual ~Module() {} |
| 29 | }; |
| 30 | |
| 31 | } // namespace webrtc |
| 32 | |
| 33 | #endif // MODULE_H |