Ignite Tools
Shared/Airship/Library/InboxLib/UAInbox.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 #import <Foundation/Foundation.h>
00026 
00027 #import "UAirship.h"
00028 #import "UAGlobal.h"
00029 #import "UA_Base64.h"
00030 #import "UAInboxMessageList.h"
00031 #import "UAInboxPushHandler.h"
00032 #import "UAInboxAlertProtocol.h"
00033 
00034 #define INBOX_UI_CLASS @"UAInboxUI"
00035 
00036 UA_VERSION_INTERFACE(UAInboxVersion)
00037 
00038 @protocol UAInboxUIProtocol
00039 @required
00040 + (void)quitInbox;
00041 + (void)loadLaunchMessage;
00042 + (void)displayInbox:(UIViewController *)viewController animated:(BOOL)animated;
00043 + (void)displayMessage:(UIViewController *)viewController message:(NSString*)messageID;
00044 + (id<UAInboxAlertProtocol>)getAlertHandler;
00045 @end
00046 
00047 
00048 @protocol UAInboxJavaScriptDelegate <NSObject>
00049 
00050 // Template implementation in UAInboxDefaultJSDelegate.m
00051 - (NSString *)callbackArguments:(NSArray *)args withOptions:(NSDictionary *)options;
00052 
00053 @end
00054 
00055 
00056 @interface UAInbox : NSObject {
00057 
00058     UAInboxMessageList *activeInbox;
00059         UAInboxPushHandler *pushHandler;
00060         
00061     id<UAInboxJavaScriptDelegate> jsDelegate;
00062         
00063     
00064         NSURLCache *clientCache, *inboxCache;
00065 }
00066 
00067 SINGLETON_INTERFACE(UAInbox);
00068 
00069 - (Class)uiClass;
00070 + (void)useCustomUI:(Class)customUIClass;
00071 + (void)quitInbox;
00072 + (void)setInbox:(UAInboxMessageList *)inbox;
00073 + (void)displayInbox:(UIViewController *)viewController animated:(BOOL)animated;
00074 + (void)displayInboxOnLoad:(UAInboxMessageList *)inbox;
00075 + (void)displayMessage:(UIViewController *)viewController message:(NSString*)messageID;
00076 + (void)land;
00077 + (void)addAuthToWebRequest:(NSMutableURLRequest*)requestObj;
00078 + (void)setRuniPhoneTargetOniPad:(BOOL)value;
00079 
00080 @property (nonatomic, assign) UAInboxMessageList *activeInbox;
00081 @property (nonatomic, retain) UAInboxPushHandler *pushHandler;
00082 @property (nonatomic, assign) id<UAInboxJavaScriptDelegate> jsDelegate;
00083 @property(retain) NSURLCache *clientCache, *inboxCache;
00084 
00085 @end
 All Classes Functions Variables Properties