#ifndef __DMIDISKSESSION_H__
#define __DMIDISKSESSION_H__
/*
DMiDiskSession.h
Copyright (C) 2004-2005 Apple Computer, Inc. All rights reserved.
Public header file.
*/
#import <DotMacKit/DMTypesAndConstants.h>
/*! @header DMiDiskSession
* @abstract Defines access to the DMiDiskSession object, which provides efficient read/write
* access to the iDisk belonging to the associated .Mac account.
* @discussion Please note: All server-side paths passed as arguments to DMiDiskSession methods
* should start with a forward slash, omitting the iDisk account name at the beginning of the
* path--for example, if uploading a local file to a user's Public folder, the second path
* passed to the putLocalFileAtPath:toPath: method would be of the format '/Public/filename'.
*/
@class DMAccount;
@class DMTransaction;
/*!
* @class DMiDiskSession
* @abstract A DMiDiskSession object provides efficient read/write access to the iDisk belonging
* to the associated .Mac account.
*/
@interface DMiDiskSession : NSObject {
DMAccount *_account;
id _recent_lock_tokens;
id _delegate;
BOOL _use_synchronous;
NSTimeInterval _lockDuration;
id _session_data;
BOOL _checked;
BOOL _checkPreAuth;
NSLock *_auth_lock;
id _my_private_ivars;
}
#pragma mark -
#pragma mark Factories and Initers
/*!
* @method iDiskSessionWithAccount:
* @abstract Returns a new autoreleased session corresponding to the provided account's iDisk.
* @discussion This method will return an auto-released iDisk session instance that can be used to
* perform I/O transactions with the .Mac iDisk servers. It requires a DMMemberAccount
* argument, the credentials of which will be used to access the given iDisk.
* @param account The .Mac account, containing the credentials needed for iDisk access.
* @result A new autoreleased DMiDiskSession object.
*/
+ (id)iDiskSessionWithAccount: (DMAccount *)account;
/*!
* @method initWithAccount:
* @abstract Initialize a new allocated session corresponding to the provided account's iDisk.
* @discussion This method will return an iDisk session instance that can be used to perform
* I/O transactions with the .Mac iDisk servers. It requires a DMAccount argument, the
* credentials of which will be used to access the given iDisk.
* @param account The .Mac account, containing the credentials needed for iDisk access.
* @result A newly initialized and allocated DMiDiskSession object.
*/
- (id)initWithAccount: (DMAccount *)account;
#pragma mark -
#pragma mark Dealing with access and the account
/*!
* @method validateAccess
* @abstract Used to check that the credentials set for the session can access the iDisk.
* @discussion Use this method to check that the client machine and the account associated with
* this iDisk session have access to the iDisk servers. The returned integer corresponds
* to one of the status constants defined in DMTypesAndConstants.h.
* @result A status constant, as defined in DMTypesAndConstants.h.
*/
- (int)validateAccess;
/*!
* @method account
* @abstract Used to access the account object associated with this session's iDisk.
* @discussion Returns the account object containing the credentials being used to access this
* session's iDisk.
* @result Returns the account object associated with this session's iDisk.
*/
- (DMAccount *)account;
#pragma mark -
#pragma mark Dealing with delegates
/*!
* @method setDelegate:
* @abstract Used to set the delegate object which will receive transaction status messages.
* @discussion Sets the delegate object that will receive status messages from asynchronous
* DMiDiskSession transactions as they complete. The object passed in this method's delegate
* parameter must conform to the informal DMTransactionDelegate protocol. Delegates receive
* their messages on the run loop originally used to create the given DMTransaction. It is
* safe to call this method to change the delegate as needed--since an in-flight DMTransaction
* object uses the settings that were in place at the time it was created, calling this
* method will not affect any transaction already in progress.
* @param delegate The delegate object which will receive status messages.
*/
- (void)setDelegate: (id)delegate;
/*!
* @method delegate
* @abstract Used to get the currently set delegate object that receives transaction status messages.
* @result Returns the object that is currently set to receive asynchronous transaction status
* messages.
*/
- (id)delegate;
#pragma mark -
#pragma mark Dealing with synchronicity
/*!
* @method setIsSynchronous:
* @abstract Used to set the synchronicity state of this session.
* @discussion Passing YES for useSynchronous will cause this DMiDiskSession object's transaction
* methods to block until they have either completed their transaction or failed with an error.
* Passing NO will cause the methods to return immediately, using any previously set delegate
* object to signal completion or error. It is safe to call this method to switch between
* asynchronous and synchronous modes as needed--since an in-flight DMTransaction object uses
* the settings that were in place at the time it was created, calling this method will not
* affect any transaction already in progress. [Note: DMiDiskSession's default mode is asynchronous.]
* @param useSynchronous Boolean value specifying the state of synchronicity for this session.
*/
- (void)setIsSynchronous: (BOOL)useSynchronous;
/*!
* @method isSynchronous
* @abstract Used to set the synchronicity state of this session.
* @discussion Gets the current state of synchronicity for this session. Returns either YES
* for synchronous or NO for asynchronous. [Note: DMiDiskSession's default
* mode is asynchronous.]
* @result Returns the synchronicity state of this session.
*/
- (BOOL)isSynchronous;
#pragma mark -
#pragma mark Getting the storage quota
/*!
* @method quotaAttributes
* @abstract Gets the user's iDisk quota and amount of space currently used.
* @discussion Use this method to get the user's iDisk quota value along with the amount of storage
* space that is currently used. The returned DMTransaction object's result method
* returns an NSDictionary containing two NSNumber values, which can be retrieved
* using the following key constants: kDMiDiskQuotaInBytes and kDMiDiskSpaceUsedInBytes.
* @result Returns a DMTransaction whose result method returns an NSDictionary with the user's
* iDisk quota and amount of space currently used.
*/
- (DMTransaction *)quotaAttributes;
#pragma mark -
#pragma mark Downloading data
/*!
* @method getDataAtPath:
* @abstract Gets data from the provided iDisk path.
* @discussion If the transaction is successful, the returned DMTransaction object's result method
* returns an NSData object containing the desired resource (this NSData object is
* memory-mapped from a file in /tmp, allowing an application to download a large amount
* of data without bringing it into real memory until it is actually needed--clean-up of the
* temporary file happens automatically). [Note: If the transaction is asynchronous and is not
* yet complete, the result method will return the data that has been downloaded so far.] The
* returned DMTransaction object can be used to get the result of the transaction, status,
* payload, and many other pieces of information about the actual transaction.
* @param sourcePath A remote iDisk path.
* @result Returns a DMTransaction whose result method returns an NSData object containing data from
* the resource of the provided iDisk path.
*/
- (DMTransaction *)getDataAtPath: (NSString *)sourcePath;
/*!
* @method getDataAtPath:ifModifiedSince:
* @abstract Gets data from the provided iDisk path.
* @discussion If the transaction is successful, the returned DMTransaction object's result method
* returns an NSData object containing the desired resource (th
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
knox-Mac下最好的文件加密软件 (125个子文件)
CodeResources 7KB
DotMacKit 909KB
DotMacKit 909KB
DotMacKit 909KB
Growl 253KB
Growl 253KB
Growl 253KB
DMiDiskSession.h 36KB
DMiDiskSession.h 36KB
DMiDiskSession.h 36KB
GrowlApplicationBridge-Carbon.h 34KB
GrowlApplicationBridge-Carbon.h 34KB
GrowlApplicationBridge-Carbon.h 34KB
GrowlApplicationBridge.h 27KB
GrowlApplicationBridge.h 27KB
GrowlApplicationBridge.h 27KB
GrowlDefines.h 15KB
GrowlDefines.h 15KB
GrowlDefines.h 15KB
DMMemberAccount.h 14KB
DMMemberAccount.h 14KB
DMMemberAccount.h 14KB
DMTransaction.h 6KB
DMTransaction.h 6KB
DMTransaction.h 6KB
DMTypesAndConstants.h 5KB
DMTypesAndConstants.h 5KB
DMTypesAndConstants.h 5KB
DMTransactionDelegate.h 2KB
DMTransactionDelegate.h 2KB
DMTransactionDelegate.h 2KB
DotMacKit.h 532B
DotMacKit.h 532B
DotMacKit.h 532B
DMAccount.h 471B
DMAccount.h 471B
DMAccount.h 471B
Growl.h 130B
Growl.h 130B
Growl.h 130B
program-icon.icns 279KB
vault-icon.icns 125KB
document-icon.icns 44KB
Knox 925KB
Knox Spotlight Helper 19KB
README.markdown 4KB
Preferences.nib 70KB
CreateDiskImage.nib 42KB
Update.nib 16KB
CrashReporter.nib 15KB
MainMenu.nib 14KB
BackupChooser.nib 11KB
RestoreChooser.nib 11KB
iPodSelectionSheet.nib 8KB
ChangePassword.nib 8KB
AboutView.nib 8KB
Authenticate.nib 8KB
DotMacAccountSelection.nib 8KB
Dialog.nib 6KB
LKPanel.nib 6KB
NewVaultProgress.nib 5KB
UpdateStatus.nib 5KB
PkgInfo 8B
Info.plist 4KB
Info.plist 738B
Info.plist 738B
Info.plist 738B
Info.plist 664B
Info.plist 664B
Info.plist 664B
version.plist 395B
locversion.plist 395B
locversion.plist 395B
version.plist 395B
version.plist 395B
locversion.plist 395B
aboutknox.png 29KB
VaultsToolbarItemImage.png 3KB
LicenseToolbarItemImage.png 2KB
dock-icon-20.png 2KB
dock-icon-19.png 2KB
dock-icon-29.png 2KB
dock-icon-21.png 2KB
dock-icon-22.png 2KB
dock-icon-25.png 2KB
dock-icon-26.png 2KB
dock-icon-11.png 2KB
dock-icon-24.png 2KB
dock-icon-28.png 2KB
dock-icon-30.png 2KB
dock-icon-23.png 2KB
dock-icon-27.png 2KB
dock-icon-13.png 2KB
dock-icon-10.png 2KB
dock-icon-12.png 2KB
dock-icon-14.png 2KB
dock-icon-18.png 2KB
BackupsToolbarItemImage.png 2KB
dock-icon-15.png 2KB
dock-icon-16.png 2KB
共 125 条
- 1
- 2
资源评论
- readfz2013-10-14好像不能用啊。
畹澈
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功