diff options
Diffstat (limited to 'Firestore/core/include/firebase/firestore/event_listener.h')
-rw-r--r-- | Firestore/core/include/firebase/firestore/event_listener.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Firestore/core/include/firebase/firestore/event_listener.h b/Firestore/core/include/firebase/firestore/event_listener.h index 6c94428..cbe8a28 100644 --- a/Firestore/core/include/firebase/firestore/event_listener.h +++ b/Firestore/core/include/firebase/firestore/event_listener.h @@ -22,19 +22,19 @@ #ifndef FIRESTORE_CORE_INCLUDE_FIREBASE_FIRESTORE_EVENT_LISTENER_H_ #define FIRESTORE_CORE_INCLUDE_FIREBASE_FIRESTORE_EVENT_LISTENER_H_ +#include "firebase/firestore/firestore_errors.h" + namespace firebase { namespace firestore { -// TODO(rsgowman): replace these forward decl's with appropriate includes (once -// they exist) -class Error; - /** * @brief An interface for event listeners. */ template <typename T> class EventListener { public: + virtual ~EventListener() { + } /** * @brief OnEvent will be called with the new value or the error if an error * occurred. @@ -44,7 +44,7 @@ class EventListener { * @param value The value of the event. null if there was an error. * @param error The error if there was error. null otherwise. */ - void OnEvent(const T* value, const Error* error); + virtual void OnEvent(const T* value, const Error* error) = 0; }; } // namespace firestore |