From 68f0e2dafbc99df0789be5fd0aa847ae69940363 Mon Sep 17 00:00:00 2001 From: zxu Date: Fri, 25 May 2018 15:06:19 -0400 Subject: Firestore project: Import of API interfaces. (#1337) - 198063502 Address comment upstream. by zxu - 197942352 Fix style upstream and fix destination depot in copybara. by zxu - 197925542 Fix headers with change from GitHub, see the current diff... by zxu - 197922012 Implement ListenerRegistration::Remove(). by zxu - 197713382 Implement more on listener class and implement ListenerRe... by zxu - 196551381 Implement more on listener class and implement the Docume... by zxu - 196276752 Implement the SnapshotMetadata with inline methods and (n... by zxu - 195841793 Implement the wrapper class for callback (EventListener). by zxu - 194112388 Add Android-Wrapper for DocumentReference's non-callback ... by zxu - 192445183 Add Android-Wrapper for Firestore's remaining methods. by zxu - 190986604 Manually import the public portion of by mcg - 189013767 Add Android-Wrapper for Firestore's method that does not ... by zxu - 188809445 Import of firebase-ios-sdk from Github. by mcg - 187049498 Import of firebase-ios-sdk from Github. by mcg - 184568931 Import of firebase-ios-sdk from Github. by mcg ORIGINAL_AUTHOR=Firebase PiperOrigin-RevId: 198063502 --- Firestore/core/include/firebase/firestore/event_listener.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Firestore/core/include/firebase/firestore/event_listener.h') 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 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 -- cgit v1.2.3