include/OFInvite.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 #import "OFResource.h"
00017 
00018 @class OFUser, OFInviteDefinition, OFService;
00019 @class OFRequestHandle;
00020 class OFHttpService;
00021 class OFImageViewHttpServiceObserver;
00022 
00023 @protocol OFInviteSendDelegate;
00024 
00025 
00030 @interface OFInvite : OFResource<OFCallbackable>
00031 {
00032 @private
00033     OFUser* senderUser;                     
00034     OFUser* receiverUser;                   
00035     
00036     // copied out of the invite definition.  carrot and suggestedUserMessage are no longer needed.
00037     NSString* clientApplicationName;        
00038     NSString* clientApplicationID;          
00039     NSString* inviteIdentifier;             
00040     NSString* senderParameter;              
00041     NSString* receiverParameter;            
00042     NSString* inviteIconURL;                
00043     NSString* developerMessage;             
00044     NSString* receiverNotification;         
00045     NSString* senderNotification;           
00046     
00047     NSString* userMessage;                  
00048     NSString* state;
00049     
00050     OFInviteDefinition* inviteDefinition;
00051     
00052     OFPointer<OFHttpService> mHttpService;
00053     OFPointer<OFImageViewHttpServiceObserver> mHttpServiceObserver;
00054 }
00055 
00062 + (void)setDelegate:(id<OFInviteSendDelegate>)delegate;
00063 
00074 - (OFInvite*)initWithInviteDefinition:(OFInviteDefinition*)inviteDefinitionIn;
00075 
00088 - (OFRequestHandle*)sendInviteToUsers:(NSArray*)users;
00089 
00095 - (void)displayAndSendInviteScreen;
00096 
00105 - (OFRequestHandle*)getInviteIcon;
00106 
00110 @property (nonatomic, retain) NSString* userMessage;
00111 
00117 @property (nonatomic, readonly) NSString* senderParameter;
00118 
00124 @property (nonatomic, readonly) NSString* receiverParameter;
00125 
00129 + (NSString*)getResourceName;
00130 @property (nonatomic, readonly) OFUser* senderUser;
00131 @property (nonatomic, readonly) OFUser* receiverUser;
00132 @property (nonatomic, readonly) NSString* clientApplicationName;
00133 @property (nonatomic, readonly) NSString* clientApplicationID;
00134 @property (nonatomic, readonly) NSString* inviteIdentifier;
00135 @property (nonatomic, readonly) NSString* inviteIconURL;
00136 @property (nonatomic, readonly) NSString* developerMessage;
00137 @property (nonatomic, readonly) NSString* receiverNotification;
00138 @property (nonatomic, readonly) NSString* senderNotification;
00139 @property (nonatomic, readonly) NSString* state;
00140 
00141 @end
00142 
00147 @protocol OFInviteSendDelegate
00148 @optional
00149 
00155 - (void)didSendInvite:(OFInvite*)invite;
00156 
00162 - (void)didFailSendInvite:(OFInvite*)invite;
00163 
00170 - (void)didGetInviteIcon:(UIImage*)image OFInvite:(OFInvite*)invite;
00171 
00177 - (void)didFailGetInviteIconOFInvite:(OFInvite*)invite;
00178 
00179 @end
00180 
00181 
00182 
 All Classes Files Functions Variables Enumerations Enumerator Properties