C# 클래스 Google.GData.Client.ResumableUpload.ResumableUploader

this class handles the Resumable Upload protocol
상속: AsyncDataHandler
파일 보기 프로젝트 열기: moljac/MonoMobile.Google.GData 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
CreateMediaRelation string
EditMediaRelation string

공개 메소드들

메소드 설명
GetResumableCreateUri ( AtomLinkCollection links ) : Uri

returns the resumabled create media Uri for a given entry

GetResumableEditUri ( AtomLinkCollection links ) : Uri

returns the resumable edit media Uri for a given entry

InitiateUpload ( Uri resumableUploadUri, Authenticator authentication, AbstractEntry entry ) : Uri

retrieves the resumable URI for the rest of the operation. This will initiate the communication with resumable upload server by posting against the starting URI

InitiateUpload ( Uri resumableUploadUri, Authenticator authentication, AbstractEntry entry, string httpMethod ) : Uri

retrieves the resumable URI for the rest of the operation. This will initiate the communication with resumable upload server by posting against the starting URI

InitiateUpload ( Uri resumableUploadUri, Authenticator authentication, string contentType, string slug, long contentLength ) : Uri

retrieves the resumable URI for the rest of the operation. This will initiate the communication with resumable upload server by posting against the starting URI

InitiateUpload ( Uri resumableUploadUri, Authenticator authentication, string contentType, string slug, long contentLength, string httpMethod ) : Uri

retrieves the resumable URI for the rest of the operation. This will initiate the communication with resumable upload server by posting against the starting URI

Insert ( Authenticator authentication, AbstractEntry payload ) : WebResponse

Uploads an entry, including it's media to the uri given inside the entry.

Insert ( Authenticator authentication, Uri resumableUploadUri, Stream payload, string contentType, string slug ) : WebResponse

Uploads just the media media to the uri given.

InsertAsync ( Authenticator authentication, AbstractEntry payload, object userData ) : void
InsertAsync ( Authenticator authentication, Uri resumableUploadUri, Stream payload, string contentType, string slug, object userData ) : void
QueryStatus ( Authenticator authentication, Uri targetUri ) : long

asks the server about the current status

ResumableUploader ( ) : System

Default constructor. Uses the default chunksize of 25 megabyte

ResumableUploader ( int chunkSize ) : System

ResumableUploader constructor.

Resume ( Authenticator authentication, Uri resumeUri, String httpMethod, Stream payload, string contentType ) : WebResponse
ResumeAsync ( Authenticator authentication, Uri resumeUri, String httpmethod, Stream payload, string contentType, object userData ) : void
Update ( Authenticator authentication, AbstractEntry payload ) : WebResponse

Uploads an entry, including its media to the uri given inside the entry

Update ( Authenticator authentication, Uri resumableUploadUri, Stream payload, string contentType ) : WebResponse

Uploads just the media to the uri given.

UpdateAsync ( Authenticator authentication, AbstractEntry payload, object userData ) : void
UpdateAsync ( Authenticator authentication, Uri resumableUploadUri, Stream payload, string contentType, object userData ) : void
UploadStream ( string httpMethod, Uri sessionUri, Authenticator authentication, Stream payload, string mediaType, AsyncData data ) : WebResponse

Note the URI passed in here, is the session URI obtained by InitiateUpload

보호된 메소드들

메소드 설명
CopyData ( Stream input, HttpWebRequest request, int partIndex, AsyncData data, Uri requestId ) : bool

takes our copy of the stream, and puts it into the request stream returns FALSE when we are done by reaching the end of the input stream

비공개 메소드들

메소드 설명
AsyncInsertWorker ( AsyncResumableUploadData data, AsyncOperation asyncOp, SendOrPostCallback completionMethodDelegate ) : void

worker method for the the resumable insert

AsyncResumeWorker ( AsyncResumableUploadData data, AsyncOperation asyncOp, SendOrPostCallback completionMethodDelegate ) : void

worker method to handle the resume operation

AsyncStarter ( AsyncResumableUploadData data, WorkerResumableUploadHandler workerDelegate, Object userData ) : void

starts the async job

AsyncUpdateWorker ( AsyncResumableUploadData data, AsyncOperation asyncOp, SendOrPostCallback completionMethodDelegate ) : void

worker method for the resumable update

GetStreamLength ( Stream s ) : long
Insert ( Authenticator authentication, AbstractEntry payload, AsyncData data ) : WebResponse
Insert ( Authenticator authentication, Uri resumableUploadUri, Stream payload, string contentType, string slug, AsyncData data ) : WebResponse
PrepareRequest ( Uri target, Authenticator authentication, string slug, string contentType, long contentLength ) : HttpWebRequest
PrepareRequest ( Uri target, Authenticator authentication, string slug, string contentType, long contentLength, string httpMethod ) : HttpWebRequest
Resume ( Authenticator authentication, Uri resumeUri, String httpmethod, Stream payload, string contentType, AsyncData data ) : WebResponse
Update ( Authenticator authentication, AbstractEntry payload, AsyncData data ) : WebResponse
Update ( Authenticator authentication, Uri resumableUploadUri, Stream payload, string contentType, AsyncData data ) : WebResponse
UploadStreamPart ( int partIndex, string httpMethod, Uri sessionUri, Authenticator authentication, Stream payload, string mediaType, AsyncData data ) : HttpWebResponse

메소드 상세

CopyData() 보호된 메소드

takes our copy of the stream, and puts it into the request stream returns FALSE when we are done by reaching the end of the input stream
protected CopyData ( Stream input, HttpWebRequest request, int partIndex, AsyncData data, Uri requestId ) : bool
input Stream
request System.Net.HttpWebRequest
partIndex int
data AsyncData
requestId System.Uri
리턴 bool

GetResumableCreateUri() 공개 정적인 메소드

returns the resumabled create media Uri for a given entry
public static GetResumableCreateUri ( AtomLinkCollection links ) : Uri
links AtomLinkCollection
리턴 System.Uri

GetResumableEditUri() 공개 정적인 메소드

returns the resumable edit media Uri for a given entry
public static GetResumableEditUri ( AtomLinkCollection links ) : Uri
links AtomLinkCollection
리턴 System.Uri

InitiateUpload() 공개 메소드

retrieves the resumable URI for the rest of the operation. This will initiate the communication with resumable upload server by posting against the starting URI
public InitiateUpload ( Uri resumableUploadUri, Authenticator authentication, AbstractEntry entry ) : Uri
resumableUploadUri System.Uri
authentication Authenticator
entry AbstractEntry
리턴 System.Uri

InitiateUpload() 공개 메소드

retrieves the resumable URI for the rest of the operation. This will initiate the communication with resumable upload server by posting against the starting URI
public InitiateUpload ( Uri resumableUploadUri, Authenticator authentication, AbstractEntry entry, string httpMethod ) : Uri
resumableUploadUri System.Uri
authentication Authenticator
entry AbstractEntry
httpMethod string
리턴 System.Uri

InitiateUpload() 공개 메소드

retrieves the resumable URI for the rest of the operation. This will initiate the communication with resumable upload server by posting against the starting URI
public InitiateUpload ( Uri resumableUploadUri, Authenticator authentication, string contentType, string slug, long contentLength ) : Uri
resumableUploadUri System.Uri
authentication Authenticator
contentType string
slug string
contentLength long
리턴 System.Uri

InitiateUpload() 공개 메소드

retrieves the resumable URI for the rest of the operation. This will initiate the communication with resumable upload server by posting against the starting URI
public InitiateUpload ( Uri resumableUploadUri, Authenticator authentication, string contentType, string slug, long contentLength, string httpMethod ) : Uri
resumableUploadUri System.Uri
authentication Authenticator
contentType string
slug string
contentLength long
httpMethod string
리턴 System.Uri

Insert() 공개 메소드

Uploads an entry, including it's media to the uri given inside the entry.
public Insert ( Authenticator authentication, AbstractEntry payload ) : WebResponse
authentication Authenticator The authentication information to be used
payload AbstractEntry The entry to be uploaded. This is a complete entry, including the metadata. /// This will create a new entry on the service
리턴 System.Net.WebResponse

Insert() 공개 메소드

Uploads just the media media to the uri given.
public Insert ( Authenticator authentication, Uri resumableUploadUri, Stream payload, string contentType, string slug ) : WebResponse
authentication Authenticator The authentication information to be used
resumableUploadUri System.Uri
payload Stream The media to uploaded.
contentType string The type of the content, e.g. text/html
slug string
리턴 System.Net.WebResponse

InsertAsync() 공개 메소드

public InsertAsync ( Authenticator authentication, AbstractEntry payload, object userData ) : void
authentication Authenticator
payload AbstractEntry
userData object
리턴 void

InsertAsync() 공개 메소드

public InsertAsync ( Authenticator authentication, Uri resumableUploadUri, Stream payload, string contentType, string slug, object userData ) : void
authentication Authenticator
resumableUploadUri System.Uri
payload Stream
contentType string
slug string
userData object
리턴 void

QueryStatus() 공개 정적인 메소드

asks the server about the current status
public static QueryStatus ( Authenticator authentication, Uri targetUri ) : long
authentication Authenticator
targetUri System.Uri
리턴 long

ResumableUploader() 공개 메소드

Default constructor. Uses the default chunksize of 25 megabyte
public ResumableUploader ( ) : System
리턴 System

ResumableUploader() 공개 메소드

ResumableUploader constructor.
public ResumableUploader ( int chunkSize ) : System
chunkSize int the upload chunksize in Megabytes, needs to be greater than 0
리턴 System

Resume() 공개 메소드

public Resume ( Authenticator authentication, Uri resumeUri, String httpMethod, Stream payload, string contentType ) : WebResponse
authentication Authenticator
resumeUri System.Uri
httpMethod String
payload Stream
contentType string
리턴 System.Net.WebResponse

ResumeAsync() 공개 메소드

public ResumeAsync ( Authenticator authentication, Uri resumeUri, String httpmethod, Stream payload, string contentType, object userData ) : void
authentication Authenticator
resumeUri System.Uri
httpmethod String
payload Stream
contentType string
userData object
리턴 void

Update() 공개 메소드

Uploads an entry, including its media to the uri given inside the entry
public Update ( Authenticator authentication, AbstractEntry payload ) : WebResponse
authentication Authenticator The authentication information to be used
payload AbstractEntry The entry to be uploaded. This is a complete entry, including the metadata. /// This will create a new entry on the service
리턴 System.Net.WebResponse

Update() 공개 메소드

Uploads just the media to the uri given.
public Update ( Authenticator authentication, Uri resumableUploadUri, Stream payload, string contentType ) : WebResponse
authentication Authenticator The authentication information to be used
resumableUploadUri System.Uri
payload Stream The media to uploaded.
contentType string The type of the content, e.g. text/html
리턴 System.Net.WebResponse

UpdateAsync() 공개 메소드

public UpdateAsync ( Authenticator authentication, AbstractEntry payload, object userData ) : void
authentication Authenticator
payload AbstractEntry
userData object
리턴 void

UpdateAsync() 공개 메소드

public UpdateAsync ( Authenticator authentication, Uri resumableUploadUri, Stream payload, string contentType, object userData ) : void
authentication Authenticator
resumableUploadUri System.Uri
payload Stream
contentType string
userData object
리턴 void

UploadStream() 공개 메소드

Note the URI passed in here, is the session URI obtained by InitiateUpload
public UploadStream ( string httpMethod, Uri sessionUri, Authenticator authentication, Stream payload, string mediaType, AsyncData data ) : WebResponse
httpMethod string
sessionUri System.Uri
authentication Authenticator
payload Stream
mediaType string
data AsyncData
리턴 System.Net.WebResponse

프로퍼티 상세

CreateMediaRelation 공개적으로 정적으로 프로퍼티

The relationship value to be used to find the resumable
public static string CreateMediaRelation
리턴 string

EditMediaRelation 공개적으로 정적으로 프로퍼티

public static string EditMediaRelation
리턴 string