Skip to content

Commit

Permalink
update LICENSE and KinveyKit 1.17.2
Browse files Browse the repository at this point in the history
  • Loading branch information
mikekatz committed Jul 25, 2013
1 parent 4f54171 commit a749ad0
Show file tree
Hide file tree
Showing 94 changed files with 1,791 additions and 570 deletions.
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Xcode
build/*
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
*.xcworkspace
!default.xcworkspace
xcuserdata
profile
*.moved-aside
24 changes: 24 additions & 0 deletions Airship/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
Copyright 2009-2013 Urban Airship Inc. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE URBAN AIRSHIP INC ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
EVENT SHALL URBAN AIRSHIP INC OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
Binary file added Airship/libUAirship-1.4.0.a
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#import <CoreLocation/CoreLocation.h>

/** Helper Category to allow for persisting CLLocation objects to the Kinvey backend.
@since 1.8
*/
@interface CLLocation (Kinvey)
/** Converts this CLLocation to a form persistable to Kinvey.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// KCSAppdataStore.h
// KinveyKit
//
// Copyright (c) 2012 Kinvey, Inc. All rights reserved.
// Copyright (c) 2012-2013 Kinvey, Inc. All rights reserved.
//
// This software contains valuable confidential and proprietary information of
// KINVEY, INC and is subject to applicable licensing agreements.
Expand All @@ -20,6 +20,20 @@
*/
#define KCSStoreKeyResource @"resource"

/**
KCSStore options dictionary key for the backing collection name. This can be used instead of suppling a KCSStoreKeyResource. Use with KCSStoreKeyCollectionTemplateClass.
@since 1.11.0
*/
#define KCSStoreKeyCollectionName @"collectionName"

/**
KCSStore options dictionary key for the backing collection object class. This can be used instead of suppling a KCSStoreKeyResource. Use with KCSStoreKeyCollectionName. If a KCSStoreKeyCollectionName is supplied, but no KCSStoreKeyCollectionTemplateClass, NSMutableDictionary will be used by default.
@since 1.11.0
*/
#define KCSStoreKeyCollectionTemplateClass @"collectionClass"

//internal key
#define KCSStoreKeyOngoingProgress @"referenceprogress"
#define KCSStoreKeyTitle @"storetitle"
Expand All @@ -33,7 +47,7 @@
*/
@interface KCSAppdataStore : NSObject <KCSStore>

@property (nonatomic, retain) KCSAuthHandler *authHandler;
@property (nonatomic, strong) KCSAuthHandler *authHandler;


/** Initialize an empty store with the given collections, options and the default authentication
Expand All @@ -47,7 +61,7 @@
@see [KCSStore storeWithOptions:]
@return An autoreleased empty store with configured options and default authentication.
*/
+ (id) storeWithCollection:(KCSCollection*)collection options:(NSDictionary*)options;
+ (instancetype) storeWithCollection:(KCSCollection*)collection options:(NSDictionary*)options;

/** Initialize an empty store with the given options and the given authentication
Expand All @@ -63,7 +77,7 @@
@see [KCSStore storeWithAuthHandler:withOptions:]
@return An autoreleased empty store with configured options and given authentication.
*/
+ (id)storeWithCollection:(KCSCollection*)collection authHandler:(KCSAuthHandler *)authHandler withOptions: (NSDictionary *)options;
+ (instancetype)storeWithCollection:(KCSCollection*)collection authHandler:(KCSAuthHandler *)authHandler withOptions: (NSDictionary *)options;

///---------------------------------------------------------------------------------------
/// @name Querying/Fetching
Expand Down Expand Up @@ -99,7 +113,7 @@
@param fieldOrFields The array of fields to group by (or a single `NSString` field name). If multiple field names are supplied the groups will be made from objects that form the intersection of the field values. For instance, if you have two fields "a" and "b", and objects "{a:1,b:1},{a:1,b:1},{a:1,b:2},{a:2,b:2}" and apply the `COUNT` function, the returned KCSGroup object will have an array of 3 objects: "{a:1,b:1,count:2},{a:1,b:2,count:1},{a:2,b:2,count:1}". For objects that don't have a value for a given field, the value used will be `NSNull`.
@param function This is the function that is applied to the items in the group. If you do not want to apply a function, just use queryWithQuery:withCompletionBlock:withProgressBlock: instead and query for items that match specific field values.
@param condition This is a KCSQuery object that is used to filter the objects before grouping. Only groupings with at least one object that matches the condition will appear in the resultant KCSGroup object.
@param condition This is a KCSQuery object that is used to filter the objects before grouping. Only groupings with at least one object that matches the condition will appear in the resultant KCSGroup object. __The group function does not support sorting, limit, or skip modifiers__.
@param completionBlock A block that is invoked when the grouping is complete, or an error occurs.
@param progressBlock A block that is invoked whenever the store can offer an update on the progress of the operation.
@see group:reduce:completionBlock:progressBlock:
Expand All @@ -113,7 +127,18 @@
/** Count all the elements the collection
@param countBlock the block that receives the response
@see countWithQuery:completion:
*/
- (void)countWithBlock: (KCSCountBlock)countBlock;

/** Count all the elements the collection that match a given query.
This method is useful for finding out how big a query will be without transferring all the data. This method is __not__ cached.
@param query the query to filter the elements
@param countBlock the block that receives the response
@since 1.15.0
@see countWithBlock:
*/
- (void)countWithQuery:(KCSQuery*)query completion:(KCSCountBlock)countBlock;
@end
22 changes: 22 additions & 0 deletions Kinvey/KinveyKit.framework/Versions/A/Headers/KCSAuthCredential.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
//
// KCSAuthCredential.h
// KinveyKit
//
// Created by Brian Wilson on 1/17/12.
// Copyright (c) 2012 Kinvey. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface KCSAuthCredential : NSObject

@property (nonatomic, retain) NSString *URL;
@property (nonatomic) NSInteger method;

- (instancetype)initWithURL: (NSString *)URL withMethod: (NSInteger)method;
+ (KCSAuthCredential *)credentialForURL: (NSString *)URL usingMethod: (NSInteger)method;
- (NSURLCredential *)NSURLCredential;
- (NSString *)HTTPBasicAuthString;
- (BOOL)requiresAuthentication;

@end
46 changes: 46 additions & 0 deletions Kinvey/KinveyKit.framework/Versions/A/Headers/KCSBase64.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
//
// KCSBase64.h
// KinveyKit
//
// Created by Brian Wilson on 1/17/12.
//
// Modified from:
// NSData+Base64.h
// base64
//
// Created by Matt Gallagher on 2009/06/03.
// Copyright 2009 Matt Gallagher. All rights reserved.
//
// This software is provided 'as-is', without any express or implied
// warranty. In no event will the authors be held liable for any damages
// arising from the use of this software. Permission is granted to anyone to
// use this software for any purpose, including commercial applications, and to
// alter it and redistribute it freely, subject to the following restrictions:
//
// 1. The origin of this software must not be misrepresented; you must not
// claim that you wrote the original software. If you use this software
// in a product, an acknowledgment in the product documentation would be
// appreciated but is not required.
// 2. Altered source versions must be plainly marked as such, and must not be
// misrepresented as being the original software.
// 3. This notice may not be removed or altered from any source
// distribution.
//

#import <Foundation/Foundation.h>

void *KCSNewBase64Decode(
const char *inputBuffer,
size_t length,
size_t *outputLength);

char *KCSNewBase64Encode(
const void *inputBuffer,
size_t length,
bool separateLines,
size_t *outputLength);

NSData *KCSdataFromBase64String(NSString *aString);
NSString *KCSbase64EncodedStringFromData(NSData *data);
NSString *KCSbasicAuthString(NSString *username, NSString *password);

Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
@property (copy) NSString *resourceId;

/*! Contains the actual data for the resources. */
@property (retain) NSData *resource;
@property (strong) NSData *resource;

/*! Contains the "expected" size of the resource. */
@property NSInteger length;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// KinveyKit
//
// Created by Brian Wilson on 5/2/12.
// Copyright (c) 2012 Kinvey. All rights reserved.
// Copyright (c) 2012-2013 Kinvey. All rights reserved.
//

#ifndef KinveyKit_KCSBlockDefs_h
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ typedef enum KCSCachePolicy {
} KCSCachePolicy;

#define KCSStoreKeyCachePolicy @"cachePolicy"

//internal use
#define KCSStoreKeyLocalCacheTimeout @"localcache.timeout"
#define KCSStoreKeyLocalCachePersistanceKey_Xperimental @"localcache.persistenceid"

/**
This application data store caches queries, depending on the policy.
Expand All @@ -35,18 +38,15 @@ typedef enum KCSCachePolicy {
- `KCSCachePolicyNetworkFirst` - The network is queried and the cache is updated with each result. The cached value is only returned when the network is unavailable.
- `KCSCachePolicyBoth` - If available, the cached value is returned to `completionBlock`. The network is then queried and cache updated, afterwards. The `completionBlock` will be called again with the updated result from the server.
For an individual store, the chace policy can inherit from the defaultCachePolicy, be set using storeWithOptions: factory constructor, supplying the enum for the key `KCSStoreKeyCahcePolicy`.
For an individual store, the cache policy can inherit from the defaultCachePolicy, be set using storeWithOptions: factory constructor, supplying the enum for the key `KCSStoreKeyCahcePolicy`.
This store also provides offline save semantics. To enable offline save, supply a unique string for this store for the `KCSStoreKeyUniqueOfflineSaveIdentifier` key in the options dictionary passed in class factory method ([KCSAppdataStore storeWithCollection:options:]. You can also supply an optional `KCSStoreKeyOfflineSaveDelegate` to intercept or be notified when those saves happen when the application becomes online.
If offline save is enabled, and the application is offline when the `saveObject:withCompletionBlock:withProgressBlock` method processes the saves, the completionBlock will be called with a networking error, but the saves will be queued to be saved when the application becomes online. This completion block will _not_ be called when those queued saves are processed. Instead, the the offline save delegate will be called. The completion block `errorOrNil` object will have in addition to the error information, an array in its `userInfo` for the `KCS_ERROR_UNSAVED_OBJECT_IDS_KEY` containing the `_id`s of the unsaved objects. If the objects haven't been assigned an `_id` yet, the value will be a `NSNull`, in order to keep the array count reliable.
For more information about offline saving, see KCSOfflineSaveStore and our iOS developer's user guide at docs.kinvey.com.
*/
@interface KCSCachedStore : KCSAppdataStore <KCSOfflineSaveStore> {
NSCache* _cache;
}

@interface KCSCachedStore : KCSAppdataStore <KCSOfflineSaveStore>
/** @name Cache Policy */

/** The cache policy used, by default, for this store */
Expand Down
Loading

0 comments on commit a749ad0

Please sign in to comment.