blob: 8c92a6d7e3adb43c49a7c50972e05de87011f167 [file] [log] [blame]
{{>copyright comment="//"}}
#ifndef {{screaming_snake_case PROJECT_PATH}}_{{screaming_snake_case PROJECT_NAME}}_H_
#define {{screaming_snake_case PROJECT_PATH}}_{{screaming_snake_case PROJECT_NAME}}_H_
#include <lib/async/dispatcher.h>
namespace {{snake_case PROJECT_NAME}} {
// This is the component's main class. It holds all of the component's state.
class App {
public:
explicit App(async_dispatcher_t* dispatcher);
// App objects cannot be copied; they are move-only.
App(const App&) = delete;
App& operator=(const App&) = delete;
private:
// |dispatcher_|, typically created from an async::Loop and bound to a thread, is used by
// to register and wait for events. FIDL bindings use a dispatcher to listen for incoming
// messages and dispatch them to an implementation.
async_dispatcher_t* dispatcher_;
};
} // namespace {{snake_case PROJECT_NAME}}
#endif // {{screaming_snake_case PROJECT_PATH}}_{{screaming_snake_case PROJECT_NAME}}_H_