include/OFInviteDefinition.h

Go to the documentation of this file.
00001 //  Copyright 2009-2010 Aurora Feint, Inc.
00002 // 
00003 //  Licensed under the Apache License, Version 2.0 (the "License");
00004 //  you may not use this file except in compliance with the License.
00005 //  You may obtain a copy of the License at
00006 //  
00007 //      http://www.apache.org/licenses/LICENSE-2.0
00008 //      
00009 //  Unless required by applicable law or agreed to in writing, software
00010 //  distributed under the License is distributed on an "AS IS" BASIS,
00011 //  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00012 //  See the License for the specific language governing permissions and
00013 //  limitations under the License.
00014 
00015 
00016 
00017 #import "OFResource.h"
00018 
00019 @class OFService;
00020 @class OFRequestHandle;
00021 class OFHttpService;
00022 class OFImageViewHttpServiceObserver;
00023 
00024 @protocol OFInviteDefinitionDelegate;
00025 
00026 
00031 @interface OFInviteDefinition : OFResource<OFCallbackable>
00032 {
00033     @package
00034     // These get copied into an invite (modulo string interpolation) at the time the invite is sent.
00035     NSString* clientApplicationName;        
00036     NSString* clientApplicationID;          
00037     NSString* inviteIdentifier;             
00038     NSString* senderParameter;              
00039     NSString* receiverParameter;            
00040     NSString* inviteIconURL;                
00041     NSString* developerMessage;             
00042     NSString* receiverNotification;         
00043     NSString* senderNotification;           
00044 
00045     // These don't get copied, because they're only used at send time.
00046     NSString* senderIncentiveText;          
00047     NSString* suggestedSenderMessage;
00048     
00049     OFPointer<OFHttpService> mHttpService;
00050     OFPointer<OFImageViewHttpServiceObserver> mHttpServiceObserver;
00051 }
00052 
00059 + (void)setDelegate:(id<OFInviteDefinitionDelegate>)delegate;
00060 
00069 + (OFRequestHandle*)getPrimaryInviteDefinition;
00070 
00079 + (OFRequestHandle*)getInviteDefinition:(NSString*)inviteId;
00080 
00089 - (OFRequestHandle*)getInviteIcon;
00090 
00094 @property (nonatomic, readonly) NSString* clientApplicationName;
00095 
00099 @property (nonatomic, readonly) NSString* clientApplicationID;
00100 
00104 @property (nonatomic, readonly) NSString* inviteIdentifier;
00105 
00110 @property (nonatomic, readonly) NSString* senderParameter;
00111 
00116 @property (nonatomic, readonly) NSString* receiverParameter;
00117 
00121 @property (nonatomic, readonly) NSString* developerMessage;
00122 
00126 @property (nonatomic, readonly) NSString* receiverNotification;
00127 
00131 @property (nonatomic, readonly) NSString* senderNotification;
00132 
00136 @property (nonatomic, readonly) NSString* senderIncentiveText;
00137 
00141 @property (nonatomic, readonly) NSString* suggestedSenderMessage;
00142 
00146 + (NSString*)getResourceName;
00147 @property (nonatomic, readonly) NSString* inviteIconURL;
00148 
00149 @end
00150 
00155 @protocol OFInviteDefinitionDelegate
00156 @optional
00162 - (void)didGetPrimaryInviteDefinition:(OFInviteDefinition*)definition;
00163 
00167 - (void)didFailGetPrimaryInviteDefinition;
00168 
00174 - (void)didGetInviteDefinition:(OFInviteDefinition*)definition;
00175 
00179 - (void)didFailGetInviteDefinition;
00180 
00187 - (void)didGetInviteIcon:(UIImage*)image OFInviteDefinition:(OFInviteDefinition*)inviteDef;
00188 
00194 - (void)didFailGetInviteIconOFInviteDefinition:(OFInviteDefinition*)inviteDef;
00195 
00196 @end
00197 
00198 
00199 
00200 
00201 
00202 
00203 
00204 
00205 
 All Classes Files Functions Variables Enumerations Enumerator Properties