motion-firebase 2.1.5 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +192 -64
- data/lib/firebase-auth/firebase_simple_login.rb +0 -76
- data/lib/firebase/fdata_snapshot.rb +4 -0
- data/lib/firebase/firebase.rb +53 -42
- data/lib/firebase/firebase_auth.rb +219 -0
- data/lib/firebase/firebase_facebook_helper.rb +24 -0
- data/lib/firebase/firebase_github_helper.rb +20 -0
- data/lib/firebase/firebase_twitter_helper.rb +169 -0
- data/lib/firebase/fquery.rb +16 -4
- data/lib/firebase/version.rb +2 -1
- data/lib/motion-firebase-auth.rb +3 -11
- data/lib/motion-firebase.rb +3 -1
- metadata +6 -19
- data/lib/vendor/Firebase.framework/Firebase +0 -0
- data/lib/vendor/Firebase.framework/Versions/A/Firebase +0 -0
- data/lib/vendor/Firebase.framework/Versions/A/Headers/FDataSnapshot.h +0 -146
- data/lib/vendor/Firebase.framework/Versions/A/Headers/FEventType.h +0 -43
- data/lib/vendor/Firebase.framework/Versions/A/Headers/FMutableData.h +0 -139
- data/lib/vendor/Firebase.framework/Versions/A/Headers/FQuery.h +0 -229
- data/lib/vendor/Firebase.framework/Versions/A/Headers/FTransactionResult.h +0 -50
- data/lib/vendor/Firebase.framework/Versions/A/Headers/Firebase.h +0 -707
- data/lib/vendor/Firebase.framework/build-MacOSX/Firebase.framework.bridgesupport +0 -582
- data/lib/vendor/Firebase.framework/build-iPhoneSimulator/Firebase.framework.bridgesupport +0 -582
- data/lib/vendor/FirebaseSimpleLogin.framework/FirebaseSimpleLogin +0 -0
- data/lib/vendor/FirebaseSimpleLogin.framework/Versions/A/FirebaseSimpleLogin +0 -0
- data/lib/vendor/FirebaseSimpleLogin.framework/Versions/A/Headers/FATypes.h +0 -52
- data/lib/vendor/FirebaseSimpleLogin.framework/Versions/A/Headers/FAUser.h +0 -97
- data/lib/vendor/FirebaseSimpleLogin.framework/Versions/A/Headers/FirebaseSimpleLogin.h +0 -221
- data/lib/vendor/FirebaseSimpleLogin.framework/build-MacOSX/FirebaseSimpleLogin.framework.bridgesupport +0 -230
- data/lib/vendor/FirebaseSimpleLogin.framework/build-iPhoneSimulator/FirebaseSimpleLogin.framework.bridgesupport +0 -230
data/lib/firebase/fquery.rb
CHANGED
@@ -48,6 +48,9 @@ class FQuery
|
|
48
48
|
end
|
49
49
|
end
|
50
50
|
|
51
|
+
def self.off(handle=nil)
|
52
|
+
Firebase.new.off(handle)
|
53
|
+
end
|
51
54
|
def off(handle=nil)
|
52
55
|
if handle
|
53
56
|
removeObserverWithHandle(handle)
|
@@ -61,19 +64,28 @@ class FQuery
|
|
61
64
|
queryStartingAtPriority(priority)
|
62
65
|
end
|
63
66
|
|
64
|
-
def start_at(priority, child:child)
|
65
|
-
queryStartingAtPriority(priority, andChildName:child)
|
67
|
+
def start_at(priority, child: child)
|
68
|
+
queryStartingAtPriority(priority, andChildName: child)
|
69
|
+
end
|
70
|
+
|
71
|
+
def equal_to(priority)
|
72
|
+
queryEqualToPriority(priority)
|
73
|
+
end
|
74
|
+
|
75
|
+
def equal_to(priority, child: child)
|
76
|
+
queryEqualToPriority(priority, andChildName: child)
|
66
77
|
end
|
67
78
|
|
68
79
|
def end_at(priority)
|
69
80
|
queryEndingAtPriority(priority)
|
70
81
|
end
|
71
82
|
|
72
|
-
def end_at(priority, child:child)
|
73
|
-
queryEndingAtPriority(priority, andChildName:child)
|
83
|
+
def end_at(priority, child: child)
|
84
|
+
queryEndingAtPriority(priority, andChildName: child)
|
74
85
|
end
|
75
86
|
|
76
87
|
def limit(limit)
|
77
88
|
queryLimitedToNumberOfChildren(limit)
|
78
89
|
end
|
90
|
+
|
79
91
|
end
|
data/lib/firebase/version.rb
CHANGED
data/lib/motion-firebase-auth.rb
CHANGED
@@ -4,15 +4,7 @@ end
|
|
4
4
|
|
5
5
|
|
6
6
|
Motion::Project::App.setup do |app|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
insert_point = app.files.find_index { |file| file =~ /^(?:\.\/)?app\// } || 0
|
11
|
-
|
12
|
-
Dir.glob(File.join(File.dirname(__FILE__), 'firebase-auth/**/*.rb')).reverse.each do |file|
|
13
|
-
app.files.insert(insert_point, file)
|
14
|
-
end
|
15
|
-
|
16
|
-
app.vendor_project(File.join(File.dirname(__FILE__), 'vendor/FirebaseSimpleLogin.framework'), :static, headers_dir: 'Headers', products: ['FirebaseSimpleLogin'])
|
17
|
-
app.weak_frameworks += ['Accounts', 'Social']
|
7
|
+
app.info 'Firebase', 'As of version 1.2.2 of Firebase (motion-firebase version 3.0.0), you no'
|
8
|
+
app.info '', 'longer need to include motion-firebase-auth, because FirebaseSimpleLogin'
|
9
|
+
app.info '', 'is part of the core Firebase SDK.'
|
18
10
|
end
|
data/lib/motion-firebase.rb
CHANGED
@@ -13,7 +13,9 @@ Motion::Project::App.setup do |app|
|
|
13
13
|
app.files.insert(insert_point, file)
|
14
14
|
end
|
15
15
|
|
16
|
-
app.vendor_project(File.join(File.dirname(__FILE__), 'vendor/Firebase.framework'), :static, headers_dir: 'Headers', products: ['Firebase'], force_load: false)
|
17
16
|
app.libs += ['/usr/lib/libicucore.dylib', '/usr/lib/libc++.dylib']
|
18
17
|
app.frameworks += ['CFNetwork', 'Security', 'SystemConfiguration']
|
18
|
+
# for twitter or facebook
|
19
|
+
app.weak_frameworks += ['Accounts', 'Social']
|
20
|
+
app.vendor_project(File.join(File.dirname(__FILE__), 'vendor/Firebase.framework'), :static, headers_dir: 'Headers', products: ['Firebase'], force_load: false)
|
19
21
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: motion-firebase
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Colin T.A. Gray
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-09
|
11
|
+
date: 2014-10-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -34,28 +34,15 @@ extra_rdoc_files: []
|
|
34
34
|
files:
|
35
35
|
- lib/firebase/fdata_snapshot.rb
|
36
36
|
- lib/firebase/firebase.rb
|
37
|
+
- lib/firebase/firebase_auth.rb
|
38
|
+
- lib/firebase/firebase_facebook_helper.rb
|
39
|
+
- lib/firebase/firebase_github_helper.rb
|
40
|
+
- lib/firebase/firebase_twitter_helper.rb
|
37
41
|
- lib/firebase/fquery.rb
|
38
42
|
- lib/firebase/version.rb
|
39
43
|
- lib/firebase-auth/firebase_simple_login.rb
|
40
44
|
- lib/motion-firebase-auth.rb
|
41
45
|
- lib/motion-firebase.rb
|
42
|
-
- lib/vendor/Firebase.framework/build-iPhoneSimulator/Firebase.framework.bridgesupport
|
43
|
-
- lib/vendor/Firebase.framework/build-MacOSX/Firebase.framework.bridgesupport
|
44
|
-
- lib/vendor/Firebase.framework/Firebase
|
45
|
-
- lib/vendor/Firebase.framework/Versions/A/Firebase
|
46
|
-
- lib/vendor/Firebase.framework/Versions/A/Headers/FDataSnapshot.h
|
47
|
-
- lib/vendor/Firebase.framework/Versions/A/Headers/FEventType.h
|
48
|
-
- lib/vendor/Firebase.framework/Versions/A/Headers/Firebase.h
|
49
|
-
- lib/vendor/Firebase.framework/Versions/A/Headers/FMutableData.h
|
50
|
-
- lib/vendor/Firebase.framework/Versions/A/Headers/FQuery.h
|
51
|
-
- lib/vendor/Firebase.framework/Versions/A/Headers/FTransactionResult.h
|
52
|
-
- lib/vendor/FirebaseSimpleLogin.framework/build-iPhoneSimulator/FirebaseSimpleLogin.framework.bridgesupport
|
53
|
-
- lib/vendor/FirebaseSimpleLogin.framework/build-MacOSX/FirebaseSimpleLogin.framework.bridgesupport
|
54
|
-
- lib/vendor/FirebaseSimpleLogin.framework/FirebaseSimpleLogin
|
55
|
-
- lib/vendor/FirebaseSimpleLogin.framework/Versions/A/FirebaseSimpleLogin
|
56
|
-
- lib/vendor/FirebaseSimpleLogin.framework/Versions/A/Headers/FATypes.h
|
57
|
-
- lib/vendor/FirebaseSimpleLogin.framework/Versions/A/Headers/FAUser.h
|
58
|
-
- lib/vendor/FirebaseSimpleLogin.framework/Versions/A/Headers/FirebaseSimpleLogin.h
|
59
46
|
- README.md
|
60
47
|
homepage: https://github.com/colinta/motion-firebase
|
61
48
|
licenses:
|
Binary file
|
Binary file
|
@@ -1,146 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* Firebase iOS Client Library
|
3
|
-
*
|
4
|
-
* Copyright © 2013 Firebase - All Rights Reserved
|
5
|
-
* https://www.firebase.com
|
6
|
-
*
|
7
|
-
* Redistribution and use in source and binary forms, with or without
|
8
|
-
* modification, are permitted provided that the following conditions are met:
|
9
|
-
*
|
10
|
-
* 1. Redistributions of source code must retain the above copyright notice, this
|
11
|
-
* list of conditions and the following disclaimer.
|
12
|
-
*
|
13
|
-
* 2. Redistributions in binaryform must reproduce the above copyright notice,
|
14
|
-
* this list of conditions and the following disclaimer in the documentation
|
15
|
-
* and/or other materials provided with the distribution.
|
16
|
-
*
|
17
|
-
* THIS SOFTWARE IS PROVIDED BY FIREBASE AS IS AND ANY EXPRESS OR
|
18
|
-
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
19
|
-
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
20
|
-
* EVENT SHALL FIREBASE BE LIABLE FOR ANY DIRECT,
|
21
|
-
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
22
|
-
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
23
|
-
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
24
|
-
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
25
|
-
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
26
|
-
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
27
|
-
*/
|
28
|
-
|
29
|
-
#import <Foundation/Foundation.h>
|
30
|
-
|
31
|
-
@class Firebase;
|
32
|
-
|
33
|
-
/**
|
34
|
-
* An FDataSnapshot contains data from a Firebase location. Any time you read
|
35
|
-
* Firebase data, you receive the data as an FDataSnapshot.
|
36
|
-
*
|
37
|
-
* FDataSnapshots are passed to the blocks you attach with observeEventType:withBlock: or observeSingleEvent:withBlock:.
|
38
|
-
* They are efficiently-generated immutable copies of the data at a Firebase location.
|
39
|
-
* They can't be modified and will never change. To modify data at a location,
|
40
|
-
* use a Firebase reference (e.g. with setValue:).
|
41
|
-
*/
|
42
|
-
@interface FDataSnapshot : NSObject
|
43
|
-
|
44
|
-
|
45
|
-
/** @name Navigating and inspecting a snapshot */
|
46
|
-
|
47
|
-
/**
|
48
|
-
* Get an FDataSnapshot for the location at the specified relative path.
|
49
|
-
* The relative path can either be a simple child name (e.g. 'fred')
|
50
|
-
* or a deeper slash-separated path (e.g. 'fred/name/first'). If the child
|
51
|
-
* location has no data, an empty FDataSnapshot is returned.
|
52
|
-
*
|
53
|
-
* @param childPathString A relative path to the location of child data.
|
54
|
-
* @return The FDataSnapshot for the child location.
|
55
|
-
*/
|
56
|
-
- (FDataSnapshot *) childSnapshotForPath:(NSString *)childPathString;
|
57
|
-
|
58
|
-
|
59
|
-
/**
|
60
|
-
* Return YES if the specified child exists.
|
61
|
-
*
|
62
|
-
* @param childPathString A relative path to the location of a potential child.
|
63
|
-
* @return YES if data exists at the specified childPathString, else false.
|
64
|
-
*/
|
65
|
-
- (BOOL) hasChild:(NSString *)childPathString;
|
66
|
-
|
67
|
-
|
68
|
-
/**
|
69
|
-
* Return YES if the DataSnapshot has any children.
|
70
|
-
*
|
71
|
-
* @return YES if this snapshot has any children, else NO.
|
72
|
-
*/
|
73
|
-
- (BOOL) hasChildren;
|
74
|
-
|
75
|
-
|
76
|
-
/** @name Data export */
|
77
|
-
|
78
|
-
/**
|
79
|
-
* Returns the raw value at this location, coupled with any metadata, such as priority.
|
80
|
-
*
|
81
|
-
* Priorities, where they exist, are accessible under the ".priority" key in instances of NSDictionary.
|
82
|
-
* For leaf locations with priorities, the value will be under the ".value" key.
|
83
|
-
*/
|
84
|
-
- (id) valueInExportFormat;
|
85
|
-
|
86
|
-
|
87
|
-
/** @name Properties */
|
88
|
-
|
89
|
-
/**
|
90
|
-
* Returns the contents of this data snapshot as native types.
|
91
|
-
*
|
92
|
-
* Data types returned:
|
93
|
-
* * NSDictionary
|
94
|
-
* * NSArray
|
95
|
-
* * NSNumber (also includes booleans)
|
96
|
-
* * NSString
|
97
|
-
*
|
98
|
-
* @return The data as a native object.
|
99
|
-
*/
|
100
|
-
@property (strong, readonly, nonatomic) id value;
|
101
|
-
|
102
|
-
|
103
|
-
/**
|
104
|
-
* Get the number of children for this DataSnapshot.
|
105
|
-
*
|
106
|
-
* @return An integer indicating the number of children.
|
107
|
-
*/
|
108
|
-
@property (readonly, nonatomic) NSUInteger childrenCount;
|
109
|
-
|
110
|
-
|
111
|
-
/**
|
112
|
-
* Get a Firebase reference for the location that this data came from
|
113
|
-
*
|
114
|
-
* @return A Firebase instance for the location of this data
|
115
|
-
*/
|
116
|
-
@property (nonatomic, readonly, strong) Firebase* ref;
|
117
|
-
|
118
|
-
|
119
|
-
/**
|
120
|
-
* The name of the location that generated this FDataSnapshot.
|
121
|
-
*
|
122
|
-
* @return An NSString containing the name for the location of this FDataSnapshot.
|
123
|
-
*/
|
124
|
-
@property (strong, readonly, nonatomic) NSString* name;
|
125
|
-
|
126
|
-
|
127
|
-
/**
|
128
|
-
* An iterator for snapshots of the child nodes in this snapshot.
|
129
|
-
* You can use the native for..in syntax:
|
130
|
-
*
|
131
|
-
* for (FDataSnapshot* child in snapshot.children) {
|
132
|
-
* ...
|
133
|
-
* }
|
134
|
-
*
|
135
|
-
* @return An NSEnumerator of the children
|
136
|
-
*/
|
137
|
-
@property (strong, readonly, nonatomic) NSEnumerator* children;
|
138
|
-
|
139
|
-
/**
|
140
|
-
* The priority of the data in this FDataSnapshot.
|
141
|
-
*
|
142
|
-
* @return The priority as a string, or nil if no priority was set.
|
143
|
-
*/
|
144
|
-
@property (strong, readonly, nonatomic) id priority;
|
145
|
-
|
146
|
-
@end
|
@@ -1,43 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* Firebase iOS Client Library
|
3
|
-
*
|
4
|
-
* Copyright © 2013 Firebase - All Rights Reserved
|
5
|
-
* https://www.firebase.com
|
6
|
-
*
|
7
|
-
* Redistribution and use in source and binary forms, with or without
|
8
|
-
* modification, are permitted provided that the following conditions are met:
|
9
|
-
*
|
10
|
-
* 1. Redistributions of source code must retain the above copyright notice, this
|
11
|
-
* list of conditions and the following disclaimer.
|
12
|
-
*
|
13
|
-
* 2. Redistributions in binaryform must reproduce the above copyright notice,
|
14
|
-
* this list of conditions and the following disclaimer in the documentation
|
15
|
-
* and/or other materials provided with the distribution.
|
16
|
-
*
|
17
|
-
* THIS SOFTWARE IS PROVIDED BY FIREBASE AS IS AND ANY EXPRESS OR
|
18
|
-
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
19
|
-
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
20
|
-
* EVENT SHALL FIREBASE BE LIABLE FOR ANY DIRECT,
|
21
|
-
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
22
|
-
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
23
|
-
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
24
|
-
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
25
|
-
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
26
|
-
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
27
|
-
*/
|
28
|
-
|
29
|
-
#ifndef Firebase_FEventType_h
|
30
|
-
#define Firebase_FEventType_h
|
31
|
-
|
32
|
-
/**
|
33
|
-
* This enum is the set of events that you can observe at a Firebase location.
|
34
|
-
*/
|
35
|
-
typedef enum {
|
36
|
-
FEventTypeChildAdded, // 0, fired when a new child node is added to a location
|
37
|
-
FEventTypeChildRemoved, // 1, fired when a child node is removed from a location
|
38
|
-
FEventTypeChildChanged, // 2, fired when a child node at a location changes
|
39
|
-
FEventTypeChildMoved, // 3, fired when a child node moves relative to the other child nodes at a location
|
40
|
-
FEventTypeValue // 4, fired when any data changes at a location and, recursively, any children
|
41
|
-
} FEventType;
|
42
|
-
|
43
|
-
#endif
|
@@ -1,139 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* Firebase iOS Client Library
|
3
|
-
*
|
4
|
-
* Copyright © 2013 Firebase - All Rights Reserved
|
5
|
-
* https://www.firebase.com
|
6
|
-
*
|
7
|
-
* Redistribution and use in source and binary forms, with or without
|
8
|
-
* modification, are permitted provided that the following conditions are met:
|
9
|
-
*
|
10
|
-
* 1. Redistributions of source code must retain the above copyright notice, this
|
11
|
-
* list of conditions and the following disclaimer.
|
12
|
-
*
|
13
|
-
* 2. Redistributions in binaryform must reproduce the above copyright notice,
|
14
|
-
* this list of conditions and the following disclaimer in the documentation
|
15
|
-
* and/or other materials provided with the distribution.
|
16
|
-
*
|
17
|
-
* THIS SOFTWARE IS PROVIDED BY FIREBASE AS IS AND ANY EXPRESS OR
|
18
|
-
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
19
|
-
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
20
|
-
* EVENT SHALL FIREBASE BE LIABLE FOR ANY DIRECT,
|
21
|
-
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
22
|
-
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
23
|
-
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
24
|
-
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
25
|
-
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
26
|
-
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
27
|
-
*/
|
28
|
-
|
29
|
-
#import <Foundation/Foundation.h>
|
30
|
-
|
31
|
-
/**
|
32
|
-
* An FMutableData instance is populated with data from a Firebase location.
|
33
|
-
* When you are using runTransactionBlock:, you will be given an instance containing the current
|
34
|
-
* data at that location. Your block will be responsible for updating that instance to the data
|
35
|
-
* you wish to save at that location, and then returning using [FTransactionResult successWithValue:].
|
36
|
-
*
|
37
|
-
* To modify the data, set its value property to any of the native types support by Firebase:
|
38
|
-
* * NSNumber (includes BOOL)
|
39
|
-
* * NSDictionary
|
40
|
-
* * NSArray
|
41
|
-
* * NSString
|
42
|
-
* * nil / NSNull to remove the data
|
43
|
-
*
|
44
|
-
* Note that changes made to a child FMutableData instance will be visible to the parent.
|
45
|
-
*/
|
46
|
-
@interface FMutableData : NSObject
|
47
|
-
|
48
|
-
|
49
|
-
/** @name Inspecting and navigating the data */
|
50
|
-
|
51
|
-
|
52
|
-
/**
|
53
|
-
* Returns boolean indicating whether this mutable data has children.
|
54
|
-
*
|
55
|
-
* @return YES if this data contains child nodes.
|
56
|
-
*/
|
57
|
-
- (BOOL) hasChildren;
|
58
|
-
|
59
|
-
|
60
|
-
/**
|
61
|
-
* Indicates whether this mutable data has a child at the given path.
|
62
|
-
*
|
63
|
-
* @param path A path string, consisting either of a single segment, like 'child', or multiple segments, 'a/deeper/child'
|
64
|
-
* @return YES if this data contains a child at the specified relative path
|
65
|
-
*/
|
66
|
-
- (BOOL) hasChildAtPath:(NSString *)path;
|
67
|
-
|
68
|
-
|
69
|
-
/**
|
70
|
-
* Used to obtain an FMutableData instance that encapsulates the data at the given relative path.
|
71
|
-
* Note that changes made to the child will be visible to the parent.
|
72
|
-
*
|
73
|
-
* @param path A path string, consisting either of a single segment, like 'child', or multiple segments, 'a/deeper/child'
|
74
|
-
* @return An FMutableData instance containing the data at the given path
|
75
|
-
*/
|
76
|
-
- (FMutableData *) childDataByAppendingPath:(NSString *)path;
|
77
|
-
|
78
|
-
|
79
|
-
/** @name Properties */
|
80
|
-
|
81
|
-
|
82
|
-
/**
|
83
|
-
* @return An FMutableData instance containing the data at the parent location, or nil if this is the top-most location
|
84
|
-
*/
|
85
|
-
@property (strong, readonly, nonatomic) FMutableData* parent;
|
86
|
-
|
87
|
-
|
88
|
-
/**
|
89
|
-
* To modify the data contained by this instance of FMutableData, set this to any of the native types support by Firebase:
|
90
|
-
* * NSNumber (includes BOOL)
|
91
|
-
* * NSDictionary
|
92
|
-
* * NSArray
|
93
|
-
* * NSString
|
94
|
-
* * nil / NSNull to remove the data
|
95
|
-
*
|
96
|
-
* Note that setting the value will override the priority at this location.
|
97
|
-
*
|
98
|
-
* @return The current data at this location as a native object
|
99
|
-
*/
|
100
|
-
@property (strong, nonatomic) id value;
|
101
|
-
|
102
|
-
|
103
|
-
/**
|
104
|
-
* Set this property to update the priority of the data at this location. Can be set to the following types:
|
105
|
-
* * NSNumber
|
106
|
-
* * NSString
|
107
|
-
* * nil / NSNull to remove the priority
|
108
|
-
*
|
109
|
-
* @return The priority of the data at this location
|
110
|
-
*/
|
111
|
-
@property (strong, nonatomic) id priority;
|
112
|
-
|
113
|
-
|
114
|
-
/**
|
115
|
-
* @return The number of child nodes at this location
|
116
|
-
*/
|
117
|
-
@property (readonly, nonatomic) NSUInteger childrenCount;
|
118
|
-
|
119
|
-
|
120
|
-
/**
|
121
|
-
* Used to iterate over the children at this location. You can use the native for .. in syntax:
|
122
|
-
*
|
123
|
-
* for (FMutableData* child in data.children) {
|
124
|
-
* ...
|
125
|
-
* }
|
126
|
-
*
|
127
|
-
* Note that this enumerator operates on an immutable copy of the child list. So, you can modify the instance
|
128
|
-
* during iteration, but the new additions will not be visible until you get a new enumerator.
|
129
|
-
*/
|
130
|
-
@property (readonly, nonatomic, strong) NSEnumerator* children;
|
131
|
-
|
132
|
-
|
133
|
-
/**
|
134
|
-
* @return The name of this node, or nil if it is the top-most location
|
135
|
-
*/
|
136
|
-
@property (readonly, nonatomic, strong) NSString* name;
|
137
|
-
|
138
|
-
|
139
|
-
@end
|