Skip to content

Commit 82fe087

Browse files
committed
Added/fixed inline docs and documentation.md
1 parent 62367bb commit 82fe087

File tree

88 files changed

+2179
-1935
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+2179
-1935
lines changed

SoomlaiOSStore/EventHandling.h

+13-13
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
/*
2-
* Copyright (C) 2012 Soomla Inc.
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License");
5-
* you may not use this file except in compliance with the License.
6-
* You may obtain a copy of the License at
7-
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
10-
* Unless required by applicable law or agreed to in writing, software
11-
* distributed under the License is distributed on an "AS IS" BASIS,
12-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
* See the License for the specific language governing permissions and
14-
* limitations under the License.
2+
Copyright (C) 2012-2014 Soomla Inc.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
1515
*/
1616

1717

SoomlaiOSStore/EventHandling.m

+13-13
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
/*
2-
* Copyright (C) 2012 Soomla Inc.
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License");
5-
* you may not use this file except in compliance with the License.
6-
* You may obtain a copy of the License at
7-
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
10-
* Unless required by applicable law or agreed to in writing, software
11-
* distributed under the License is distributed on an "AS IS" BASIS,
12-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
* See the License for the specific language governing permissions and
14-
* limitations under the License.
2+
Copyright (C) 2012-2014 Soomla Inc.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
1515
*/
1616

1717

SoomlaiOSStore/IStoreAssets.h

+53-39
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,85 @@
11
/*
2-
* Copyright (C) 2012 Soomla Inc.
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License");
5-
* you may not use this file except in compliance with the License.
6-
* You may obtain a copy of the License at
7-
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
10-
* Unless required by applicable law or agreed to in writing, software
11-
* distributed under the License is distributed on an "AS IS" BASIS,
12-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
* See the License for the specific language governing permissions and
14-
* limitations under the License.
2+
Copyright (C) 2012-2014 Soomla Inc.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
1515
*/
1616

1717

1818
/**
19-
* This protocol represents a single game's metadata.
20-
* Use this protocol to create your assets class that will be transferred to StoreInfo
21-
* upon initialization.
19+
This protocol represents a single game's metadata.
20+
Use this protocol to create your assets class that will be transferred to
21+
StoreInfo upon initialization.
2222
*/
2323
@protocol IStoreAssets <NSObject>
2424

2525
/**
26-
* Retrieves the current version of your IStoreAssets.
27-
*
28-
* This value will determine if the saved data in the database will be deleted or not.
29-
* Bump the version every time you want to delete the old data in the DB.
30-
*
31-
* Real Game Example:
32-
* Suppose that your game has a VirtualGood called "Hat".
33-
* Let's say your game's IStoreAssets version is currently 0.
34-
* Now you want to change the name "Hat" to "Green Hat" - you will need to bump the version
35-
* from 0 to 1, in order for the new name, "Green Hat" to replace the old one, "Hat".
36-
*
37-
* Explanation: The local database on every one of your users' devices keeps your economy's metadata, such as the VirtualGood's name "Hat". When you change IStoreAssets, you must bump the version in order for the data to change in your users' local databases.
38-
*
39-
* You need to bump the version after ANY change in IStoreAssets for the local database to realize it needs to refresh its data.
40-
*
41-
* return: the version of your specific IStoreAssets.
26+
Retrieves the current version of your `IStoreAssets`.
27+
28+
This value determines if the saved data in the database will be deleted or
29+
not. Bump the version every time you want to delete the old data in the DB.
30+
31+
Real Game Example:
32+
Suppose that your game has a `VirtualGood` called "Hat".
33+
Let's say your game's `IStoreAssets` version is currently 0.
34+
Now you want to change the name "Hat" to "Green Hat" - you will need to
35+
bump the version from 0 to 1, in order for the new name, "Green Hat" to
36+
replace the old one, "Hat".
37+
38+
Explanation: The local database on every one of your users' devices keeps
39+
your economy's metadata, such as the `VirtualGood`'s name "Hat". When you
40+
change `IStoreAssets`, you must bump the version in order for the data to
41+
change in your users' local databases.
42+
43+
You need to bump the version after ANY change in `IStoreAssets` for the local
44+
database to realize it needs to refresh its data.
45+
46+
@return The version of your specific `IStoreAssets`.
4247
*/
4348
- (int)getVersion;
4449

4550
/**
46-
* A representation of your game's virtual currency.
51+
Retrieves the array of your game's virtual currencies.
52+
53+
@return All the virtual currencies in your game.
4754
*/
4855
- (NSArray*)virtualCurrencies;
4956

5057
/**
51-
* An array of all virtual goods served by your store (all kinds in one array). If you have UpgradeVGs, they must appear in the order of levels.
58+
Retrieves the array of all virtual goods served by your store (all kinds in
59+
one array).
60+
61+
@return All virtual goods in your game.
5262
*/
5363
- (NSArray*)virtualGoods;
5464

5565
/**
56-
* An array of all virtual currency packs served by your store.
66+
Retrieves the array of all virtual currency packs served by your store.
67+
68+
@return All virtual currency packs in your game.
5769
*/
5870
- (NSArray*)virtualCurrencyPacks;
5971

6072
/**
61-
* An array of all virtual categories served by your store.
73+
Retrieves the array of all virtual categories handled in your store.
74+
75+
@return All virtual categories in your game.
6276
*/
6377
- (NSArray*)virtualCategories;
6478

6579
/**
66-
* You can define non-consumable items that you'd like to use for your needs.
67-
* CONSUMABLE items are usually just currency packs.
68-
* NON-CONSUMABLE items are usually used to let users purchase a "no-ads" token.
80+
Retrieves the array of all non-consumable items served by your store.
81+
82+
@return All non-consumables served in your game.
6983
*/
7084
- (NSArray*)nonConsumableItems;
7185

SoomlaiOSStore/PurchaseTypes/PurchaseType.h

+23-19
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,27 @@
11
/*
2-
* Copyright (C) 2012 Soomla Inc.
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License");
5-
* you may not use this file except in compliance with the License.
6-
* You may obtain a copy of the License at
7-
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
10-
* Unless required by applicable law or agreed to in writing, software
11-
* distributed under the License is distributed on an "AS IS" BASIS,
12-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
* See the License for the specific language governing permissions and
14-
* limitations under the License.
2+
Copyright (C) 2012-2014 Soomla Inc.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
1515
*/
1616

1717
#import <Foundation/Foundation.h>
1818

1919
@class PurchasableVirtualItem;
2020

21-
/** ABSTRACT
22-
* A PurchaseType is a way to purchase a `PurchasableVirtualItem`. This abstract class describes basic features of the actual implementations of `PurchaseType`.
21+
/**
22+
ABSTRACT.
23+
A `PurchaseType` is a way to purchase a `PurchasableVirtualItem`. This abstract
24+
class describes basic features of the actual implementations of `PurchaseType`.
2325
*/
2426
@interface PurchaseType : NSObject {
2527
PurchasableVirtualItem* associatedItem;
@@ -30,10 +32,12 @@
3032
- (id)init;
3133

3234
/*
33-
* Buys the purchasable virtual item.
34-
* Implementation in subclasses will be according to specific type of purchase.
35-
*
36-
* @exception InsufficientFundsException if the user does not have enough funds to buy.
35+
Buys the purchasable virtual item.
36+
Implementation in subclasses will be according to the specific type of
37+
purchase.
38+
39+
@exception InsufficientFundsException Thrown if the user does not have enough
40+
funds to buy.
3741
*/
3842
- (void)buy;
3943

SoomlaiOSStore/PurchaseTypes/PurchaseType.m

+13-13
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
/*
2-
* Copyright (C) 2012 Soomla Inc.
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License");
5-
* you may not use this file except in compliance with the License.
6-
* You may obtain a copy of the License at
7-
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
10-
* Unless required by applicable law or agreed to in writing, software
11-
* distributed under the License is distributed on an "AS IS" BASIS,
12-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
* See the License for the specific language governing permissions and
14-
* limitations under the License.
2+
Copyright (C) 2012-2014 Soomla Inc.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
1515
*/
1616

1717
#import "PurchaseType.h"

SoomlaiOSStore/PurchaseTypes/PurchaseWithMarket.h

+24-21
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,45 @@
11
/*
2-
* Copyright (C) 2012 Soomla Inc.
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License");
5-
* you may not use this file except in compliance with the License.
6-
* You may obtain a copy of the License at
7-
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
10-
* Unless required by applicable law or agreed to in writing, software
11-
* distributed under the License is distributed on an "AS IS" BASIS,
12-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
* See the License for the specific language governing permissions and
14-
* limitations under the License.
2+
Copyright (C) 2012-2014 Soomla Inc.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
1515
*/
1616

1717
#import "PurchaseType.h"
1818

1919
@class MarketItem;
2020

2121
/**
22-
* This type of Purchase is used to let users purchase `PurchasableVirtualItems` with the App Store (with real $$).
22+
This type of Purchase is used to let users purchase `PurchasableVirtualItems`
23+
via the App Store (with real money $$$).
2324
*/
2425
@interface PurchaseWithMarket : PurchaseType {
2526
MarketItem* marketItem;
2627
}
2728

2829
@property (retain, nonatomic) MarketItem* marketItem;
2930

30-
/** Constructor
31-
*
32-
* @param oProductId the productId to purchase in the App Store.
33-
* @param oPrice the price in the App Store.
31+
/**
32+
Constructor
33+
34+
@param oProductId The productId to purchase in the App Store.
35+
@param oPrice The price of the product in the App Store.
3436
*/
3537
- (id)initWithProductId:(NSString*)oProductId andPrice:(double)oPrice;
3638

37-
/** Constructor
38-
*
39-
* @param oMarketItem the representation of the item in the App Store.
39+
/**
40+
Constructor
41+
42+
@param oMarketItem The representation of the item in the App Store.
4043
*/
4144
- (id)initWithMarketItem:(MarketItem*)oMarketItem;
4245

SoomlaiOSStore/PurchaseTypes/PurchaseWithMarket.m

+14-14
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
/*
2-
* Copyright (C) 2012 Soomla Inc.
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License");
5-
* you may not use this file except in compliance with the License.
6-
* You may obtain a copy of the License at
7-
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
10-
* Unless required by applicable law or agreed to in writing, software
11-
* distributed under the License is distributed on an "AS IS" BASIS,
12-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
* See the License for the specific language governing permissions and
14-
* limitations under the License.
2+
Copyright (C) 2012-2014 Soomla Inc.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
1515
*/
1616

1717
#import "PurchaseWithMarket.h"
@@ -41,7 +41,7 @@ - (id)initWithMarketItem:(MarketItem*)oMarketItem {
4141
}
4242

4343
/*
44-
* see parent
44+
see parent
4545
*/
4646
- (void)buy {
4747
LogDebug(TAG, ([NSString stringWithFormat:@"Starting in-app purchase for productId: %@", self.marketItem.productId]));

0 commit comments

Comments
 (0)