Ignite Tools
Shared/Airship/UI/Default/Subscription/Classes/Shared/UASubscriptionContentsViewController.h
00001 /*
00002  Copyright 2009-2011 Urban Airship Inc. All rights reserved.
00003 
00004  Redistribution and use in source and binary forms, with or without
00005  modification, are permitted provided that the following conditions are met:
00006 
00007  1. Redistributions of source code must retain the above copyright notice, this
00008  list of conditions and the following disclaimer.
00009 
00010  2. Redistributions in binaryform must reproduce the above copyright notice,
00011  this list of conditions and the following disclaimer in the documentation
00012  and/or other materials provided withthe distribution.
00013 
00014  THIS SOFTWARE IS PROVIDED BY THE URBAN AIRSHIP INC ``AS IS'' AND ANY EXPRESS OR
00015  IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
00016  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
00017  EVENT SHALL URBAN AIRSHIP INC OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
00018  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
00019  BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
00020  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
00021  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
00022  OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
00023  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00024  */
00025 
00026 #import <Foundation/Foundation.h>
00027 #import "UASubscriptionManager.h"
00028 
00029 @class UASubscriptionContentDetailViewController;
00030 @interface UASubscriptionContentsViewController : UIViewController
00031 <UITableViewDataSource, UITableViewDelegate, UASubscriptionManagerObserver> {
00032     UITableView *contentsTable;
00033     NSMutableArray *dataSource;
00034     NSMutableArray *downloadedContents;
00035     NSMutableArray *undownloadedContents;
00036     UASubscriptionContentDetailViewController *detailViewController;
00037     NSString *subscriptionKey;
00038 }
00039 @property (retain) IBOutlet UITableView *contentsTable;
00040 @property (nonatomic, retain) NSString *subscriptionKey;
00041 
00042 - (void)updateDataSource;
00043 
00044 @end
00045 
00046 
00047 @class UAAsyncImageView;
00048 @class UASubscriptionContent;
00049 @interface UASubscriptionContentCell : UITableViewCell {
00050     UILabel *title;
00051     UILabel *contentDescription;
00052     UAAsyncImageView *icon;
00053     UIButton *downloadButton, *restoreButton;
00054     UASubscriptionContent *content;
00055     UIProgressView *progressBar;
00056 }
00057 @property (nonatomic, retain) IBOutlet UILabel *title;
00058 @property (nonatomic, retain) IBOutlet UILabel *contentDescription;
00059 @property (nonatomic, retain) IBOutlet UAAsyncImageView *icon;
00060 @property (nonatomic, retain) IBOutlet UIButton *downloadButton, *restoreButton;
00061 @property (nonatomic, retain) IBOutlet UIProgressView *progressBar;
00062 // Has to retain content. Since content instance could be changed if new product purchased,
00063 // result in invoking released object
00064 @property (nonatomic, retain) UASubscriptionContent *content;
00065 
00066 - (void)refreshCellByContent;
00067 - (void)setButtonState:(BOOL)contentIsDownloaded;
00068 - (IBAction)actionButtonClicked:(id)sender;
00069 
00070 @end
 All Classes Functions Variables Properties