2014-09-21 14:49:57 +00:00
|
|
|
//
|
|
|
|
// MPAppDelegate_Key.h
|
|
|
|
// MasterPassword
|
|
|
|
//
|
|
|
|
// Created by Maarten Billemont on 24/11/11.
|
|
|
|
// Copyright (c) 2011 Lyndir. All rights reserved.
|
|
|
|
//
|
|
|
|
|
2014-09-26 04:32:07 +00:00
|
|
|
#import <StoreKit/StoreKit.h>
|
2014-09-21 14:49:57 +00:00
|
|
|
#import "MPAppDelegate_Shared.h"
|
|
|
|
|
2014-09-26 04:32:07 +00:00
|
|
|
#define MPProductGenerateLogins @"com.lyndir.masterpassword.products.generatelogins"
|
|
|
|
#define MPProductGenerateAnswers @"com.lyndir.masterpassword.products.generateanswers"
|
|
|
|
#define MPProductFuel @"com.lyndir.masterpassword.products.fuel"
|
|
|
|
|
|
|
|
#define MP_FUEL_HOURLY_RATE 30.f /* Tier 1 purchases/h ~> USD/h */
|
|
|
|
|
|
|
|
@protocol MPInAppDelegate
|
|
|
|
|
|
|
|
- (void)updateWithProducts:(NSArray /* SKProduct */ *)products;
|
|
|
|
- (void)updateWithTransaction:(SKPaymentTransaction *)transaction;
|
|
|
|
|
|
|
|
@end
|
2014-09-24 05:07:02 +00:00
|
|
|
|
|
|
|
@interface MPAppDelegate_Shared(InApp)
|
2014-09-21 14:49:57 +00:00
|
|
|
|
2014-09-26 04:32:07 +00:00
|
|
|
- (void)registerProductsObserver:(id<MPInAppDelegate>)delegate;
|
|
|
|
- (void)removeProductsObserver:(id<MPInAppDelegate>)delegate;
|
2014-09-21 14:49:57 +00:00
|
|
|
|
2014-09-26 04:32:07 +00:00
|
|
|
- (void)reloadProducts;
|
2014-09-24 05:07:02 +00:00
|
|
|
- (BOOL)canMakePayments;
|
2014-09-26 04:32:07 +00:00
|
|
|
- (BOOL)isFeatureUnlocked:(NSString *)productIdentifier;
|
2014-09-21 14:49:57 +00:00
|
|
|
|
2014-09-24 05:07:02 +00:00
|
|
|
- (void)restoreCompletedTransactions;
|
2014-09-26 04:32:07 +00:00
|
|
|
- (void)purchaseProductWithIdentifier:(NSString *)productIdentifier quantity:(NSInteger)quantity;
|
2014-09-24 05:07:02 +00:00
|
|
|
|
2014-09-21 14:49:57 +00:00
|
|
|
@end
|