diff options
author | Ryan Wilson <wilsonryan@google.com> | 2017-11-28 06:59:07 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-28 06:59:07 -0800 |
commit | 7386f00178be4fe1f8d8f749049d25cbf0533e6a (patch) | |
tree | 02ba61c9cda5c439b4b991c7286f93ea8512bbea /Firestore/Source/Public/FIRQuery.h | |
parent | 7459be46ffb27bc95e155a1b267f91093f1a62b0 (diff) |
Replacing FIR_SWIFT_NAME macro with NS_SWIFT_NAME. (#476)
* Replacing FIR_SWIFT_NAME macro with NS_SWIFT_NAME.
This pushes the minimum Xcode version to 7.3, as NS_SWIFT_NAME was
limited before that version (which is why the macro was introduced in
the first place).
* Fixed FIRMessaging header
Diffstat (limited to 'Firestore/Source/Public/FIRQuery.h')
-rw-r--r-- | Firestore/Source/Public/FIRQuery.h | 61 |
1 files changed, 30 insertions, 31 deletions
diff --git a/Firestore/Source/Public/FIRQuery.h b/Firestore/Source/Public/FIRQuery.h index 5c5546d..4e7e161 100644 --- a/Firestore/Source/Public/FIRQuery.h +++ b/Firestore/Source/Public/FIRQuery.h @@ -16,7 +16,6 @@ #import <Foundation/Foundation.h> -#import "FIRFirestoreSwiftNameSupport.h" #import "FIRListenerRegistration.h" @class FIRFieldPath; @@ -30,7 +29,7 @@ NS_ASSUME_NONNULL_BEGIN * Options for use with `[FIRQuery addSnapshotListener]` to control the behavior of the snapshot * listener. */ -FIR_SWIFT_NAME(QueryListenOptions) +NS_SWIFT_NAME(QueryListenOptions) @interface FIRQueryListenOptions : NSObject + (instancetype)options NS_SWIFT_UNAVAILABLE("Use initializer"); @@ -49,7 +48,7 @@ FIR_SWIFT_NAME(QueryListenOptions) * @return The receiver is returned for optional method chaining. */ - (instancetype)includeQueryMetadataChanges:(BOOL)includeQueryMetadataChanges - FIR_SWIFT_NAME(includeQueryMetadataChanges(_:)); + NS_SWIFT_NAME(includeQueryMetadataChanges(_:)); @property(nonatomic, assign, readonly) BOOL includeDocumentMetadataChanges; @@ -62,7 +61,7 @@ FIR_SWIFT_NAME(QueryListenOptions) * @return The receiver is returned for optional method chaining. */ - (instancetype)includeDocumentMetadataChanges:(BOOL)includeDocumentMetadataChanges - FIR_SWIFT_NAME(includeDocumentMetadataChanges(_:)); + NS_SWIFT_NAME(includeDocumentMetadataChanges(_:)); @end @@ -73,7 +72,7 @@ typedef void (^FIRQuerySnapshotBlock)(FIRQuerySnapshot *_Nullable snapshot, * A `FIRQuery` refers to a Query which you can read or listen to. You can also construct * refined `FIRQuery` objects by adding filters and ordering. */ -FIR_SWIFT_NAME(Query) +NS_SWIFT_NAME(Query) @interface FIRQuery : NSObject /** */ - (id)init __attribute__((unavailable("FIRQuery cannot be created directly."))); @@ -89,7 +88,7 @@ FIR_SWIFT_NAME(Query) * documentSet will be `nil` only if error is `non-nil`. */ - (void)getDocumentsWithCompletion:(FIRQuerySnapshotBlock)completion - FIR_SWIFT_NAME(getDocuments(completion:)); + NS_SWIFT_NAME(getDocuments(completion:)); /** * Attaches a listener for QuerySnapshot events. @@ -99,7 +98,7 @@ FIR_SWIFT_NAME(Query) * @return A FIRListenerRegistration that can be used to remove this listener. */ - (id<FIRListenerRegistration>)addSnapshotListener:(FIRQuerySnapshotBlock)listener - FIR_SWIFT_NAME(addSnapshotListener(_:)); + NS_SWIFT_NAME(addSnapshotListener(_:)); /** * Attaches a listener for QuerySnapshot events. @@ -113,7 +112,7 @@ FIR_SWIFT_NAME(Query) - (id<FIRListenerRegistration>)addSnapshotListenerWithOptions: (nullable FIRQueryListenOptions *)options listener:(FIRQuerySnapshotBlock)listener - FIR_SWIFT_NAME(addSnapshotListener(options:listener:)); + NS_SWIFT_NAME(addSnapshotListener(options:listener:)); // clang-format on #pragma mark - Filtering Data @@ -128,7 +127,7 @@ FIR_SWIFT_NAME(Query) */ // clang-format off - (FIRQuery *)queryWhereField:(NSString *)field - isEqualTo:(id)value FIR_SWIFT_NAME(whereField(_:isEqualTo:)); + isEqualTo:(id)value NS_SWIFT_NAME(whereField(_:isEqualTo:)); // clang-format on /** @@ -142,7 +141,7 @@ FIR_SWIFT_NAME(Query) */ // clang-format off - (FIRQuery *)queryWhereFieldPath:(FIRFieldPath *)path - isEqualTo:(id)value FIR_SWIFT_NAME(whereField(_:isEqualTo:)); + isEqualTo:(id)value NS_SWIFT_NAME(whereField(_:isEqualTo:)); // clang-format on /** @@ -156,7 +155,7 @@ FIR_SWIFT_NAME(Query) */ // clang-format off - (FIRQuery *)queryWhereField:(NSString *)field - isLessThan:(id)value FIR_SWIFT_NAME(whereField(_:isLessThan:)); + isLessThan:(id)value NS_SWIFT_NAME(whereField(_:isLessThan:)); // clang-format on /** @@ -170,7 +169,7 @@ FIR_SWIFT_NAME(Query) */ // clang-format off - (FIRQuery *)queryWhereFieldPath:(FIRFieldPath *)path - isLessThan:(id)value FIR_SWIFT_NAME(whereField(_:isLessThan:)); + isLessThan:(id)value NS_SWIFT_NAME(whereField(_:isLessThan:)); // clang-format on /** @@ -184,7 +183,7 @@ FIR_SWIFT_NAME(Query) */ // clang-format off - (FIRQuery *)queryWhereField:(NSString *)field - isLessThanOrEqualTo:(id)value FIR_SWIFT_NAME(whereField(_:isLessThanOrEqualTo:)); + isLessThanOrEqualTo:(id)value NS_SWIFT_NAME(whereField(_:isLessThanOrEqualTo:)); // clang-format on /** @@ -198,7 +197,7 @@ FIR_SWIFT_NAME(Query) */ // clang-format off - (FIRQuery *)queryWhereFieldPath:(FIRFieldPath *)path - isLessThanOrEqualTo:(id)value FIR_SWIFT_NAME(whereField(_:isLessThanOrEqualTo:)); + isLessThanOrEqualTo:(id)value NS_SWIFT_NAME(whereField(_:isLessThanOrEqualTo:)); // clang-format on /** @@ -212,7 +211,7 @@ FIR_SWIFT_NAME(Query) */ // clang-format off - (FIRQuery *)queryWhereField:(NSString *)field - isGreaterThan:(id)value FIR_SWIFT_NAME(whereField(_:isGreaterThan:)); + isGreaterThan:(id)value NS_SWIFT_NAME(whereField(_:isGreaterThan:)); // clang-format on /** @@ -226,7 +225,7 @@ FIR_SWIFT_NAME(Query) */ // clang-format off - (FIRQuery *)queryWhereFieldPath:(FIRFieldPath *)path - isGreaterThan:(id)value FIR_SWIFT_NAME(whereField(_:isGreaterThan:)); + isGreaterThan:(id)value NS_SWIFT_NAME(whereField(_:isGreaterThan:)); // clang-format on /** @@ -240,7 +239,7 @@ FIR_SWIFT_NAME(Query) */ // clang-format off - (FIRQuery *)queryWhereField:(NSString *)field - isGreaterThanOrEqualTo:(id)value FIR_SWIFT_NAME(whereField(_:isGreaterThanOrEqualTo:)); + isGreaterThanOrEqualTo:(id)value NS_SWIFT_NAME(whereField(_:isGreaterThanOrEqualTo:)); // clang-format on /** @@ -254,7 +253,7 @@ FIR_SWIFT_NAME(Query) */ // clang-format off - (FIRQuery *)queryWhereFieldPath:(FIRFieldPath *)path - isGreaterThanOrEqualTo:(id)value FIR_SWIFT_NAME(whereField(_:isGreaterThanOrEqualTo:)); + isGreaterThanOrEqualTo:(id)value NS_SWIFT_NAME(whereField(_:isGreaterThanOrEqualTo:)); // clang-format on #pragma mark - Sorting Data @@ -265,7 +264,7 @@ FIR_SWIFT_NAME(Query) * * @return The created `FIRQuery`. */ -- (FIRQuery *)queryOrderedByField:(NSString *)field FIR_SWIFT_NAME(order(by:)); +- (FIRQuery *)queryOrderedByField:(NSString *)field NS_SWIFT_NAME(order(by:)); /** * Creates and returns a new `FIRQuery` that's additionally sorted by the specified field. @@ -274,7 +273,7 @@ FIR_SWIFT_NAME(Query) * * @return The created `FIRQuery`. */ -- (FIRQuery *)queryOrderedByFieldPath:(FIRFieldPath *)path FIR_SWIFT_NAME(order(by:)); +- (FIRQuery *)queryOrderedByFieldPath:(FIRFieldPath *)path NS_SWIFT_NAME(order(by:)); /** * Creates and returns a new `FIRQuery` that's additionally sorted by the specified field, @@ -287,7 +286,7 @@ FIR_SWIFT_NAME(Query) */ // clang-format off - (FIRQuery *)queryOrderedByField:(NSString *)field - descending:(BOOL)descending FIR_SWIFT_NAME(order(by:descending:)); + descending:(BOOL)descending NS_SWIFT_NAME(order(by:descending:)); // clang-format on /** @@ -301,7 +300,7 @@ FIR_SWIFT_NAME(Query) */ // clang-format off - (FIRQuery *)queryOrderedByFieldPath:(FIRFieldPath *)path - descending:(BOOL)descending FIR_SWIFT_NAME(order(by:descending:)); + descending:(BOOL)descending NS_SWIFT_NAME(order(by:descending:)); // clang-format on #pragma mark - Limiting Data @@ -313,7 +312,7 @@ FIR_SWIFT_NAME(Query) * * @return The created `FIRQuery`. */ -- (FIRQuery *)queryLimitedTo:(NSInteger)limit FIR_SWIFT_NAME(limit(to:)); +- (FIRQuery *)queryLimitedTo:(NSInteger)limit NS_SWIFT_NAME(limit(to:)); #pragma mark - Choosing Endpoints /** @@ -326,7 +325,7 @@ FIR_SWIFT_NAME(Query) * @return The created `FIRQuery`. */ - (FIRQuery *)queryStartingAtDocument:(FIRDocumentSnapshot *)document - FIR_SWIFT_NAME(start(atDocument:)); + NS_SWIFT_NAME(start(atDocument:)); /** * Creates and returns a new `FIRQuery` that starts at the provided fields relative to the order of @@ -337,7 +336,7 @@ FIR_SWIFT_NAME(Query) * * @return The created `FIRQuery`. */ -- (FIRQuery *)queryStartingAtValues:(NSArray *)fieldValues FIR_SWIFT_NAME(start(at:)); +- (FIRQuery *)queryStartingAtValues:(NSArray *)fieldValues NS_SWIFT_NAME(start(at:)); /** * Creates and returns a new `FIRQuery` that starts after the provided document (exclusive). The @@ -349,7 +348,7 @@ FIR_SWIFT_NAME(Query) * @return The created `FIRQuery`. */ - (FIRQuery *)queryStartingAfterDocument:(FIRDocumentSnapshot *)document - FIR_SWIFT_NAME(start(afterDocument:)); + NS_SWIFT_NAME(start(afterDocument:)); /** * Creates and returns a new `FIRQuery` that starts after the provided fields relative to the order @@ -361,7 +360,7 @@ FIR_SWIFT_NAME(Query) * * @return The created `FIRQuery`. */ -- (FIRQuery *)queryStartingAfterValues:(NSArray *)fieldValues FIR_SWIFT_NAME(start(after:)); +- (FIRQuery *)queryStartingAfterValues:(NSArray *)fieldValues NS_SWIFT_NAME(start(after:)); /** * Creates and returns a new `FIRQuery` that ends before the provided document (exclusive). The end @@ -373,7 +372,7 @@ FIR_SWIFT_NAME(Query) * @return The created `FIRQuery`. */ - (FIRQuery *)queryEndingBeforeDocument:(FIRDocumentSnapshot *)document - FIR_SWIFT_NAME(end(beforeDocument:)); + NS_SWIFT_NAME(end(beforeDocument:)); /** * Creates and returns a new `FIRQuery` that ends before the provided fields relative to the order @@ -384,7 +383,7 @@ FIR_SWIFT_NAME(Query) * * @return The created `FIRQuery`. */ -- (FIRQuery *)queryEndingBeforeValues:(NSArray *)fieldValues FIR_SWIFT_NAME(end(before:)); +- (FIRQuery *)queryEndingBeforeValues:(NSArray *)fieldValues NS_SWIFT_NAME(end(before:)); /** * Creates and returns a new `FIRQuery` that ends at the provided document (exclusive). The end @@ -396,7 +395,7 @@ FIR_SWIFT_NAME(Query) * @return The created `FIRQuery`. */ - (FIRQuery *)queryEndingAtDocument:(FIRDocumentSnapshot *)document - FIR_SWIFT_NAME(end(atDocument:)); + NS_SWIFT_NAME(end(atDocument:)); /** * Creates and returns a new `FIRQuery` that ends at the provided fields relative to the order of @@ -407,7 +406,7 @@ FIR_SWIFT_NAME(Query) * * @return The created `FIRQuery`. */ -- (FIRQuery *)queryEndingAtValues:(NSArray *)fieldValues FIR_SWIFT_NAME(end(at:)); +- (FIRQuery *)queryEndingAtValues:(NSArray *)fieldValues NS_SWIFT_NAME(end(at:)); @end |