Logo Search packages:      
Sourcecode: gdata-sharp version File versions  Download package

Google::GData::Client::T< T > Class Template Reference

Inheritance diagram for Google::GData::Client::T< T >:

Google::GData::Client::Service Google::GData::Client::Entry Google::GData::Client::IService Google::GData::Client::IVersionAware Google::GData::Client::IService Google::GData::Client::IVersionAware

List of all members.


Detailed Description

template<T>
class Google::GData::Client::T< T >

a generic Feed class

base class for Request objects.

Returns:

Definition at line 34 of file feedmodel.cs.


Public Member Functions

AtomFeed Batch (AtomFeed feed, Uri batchUri)
 takes a given feed, and does a batch post of that feed against the batchUri parameter. If that one is NULL it will try to use the batch link URI in the feed
Feed< Y > Batch< Y > (List< Y > entries, Uri batchUri, GDataBatchOperationType defaultOperation)
 performs a batch operation.
Feed< Y > Batch< Y > (List< Y > entries, Feed< Y > feed, GDataBatchOperationType defaultOperation)
 performs a batch operation.
Feed< Y > Batch< Y > (List< Y > entries, Feed< Y > feed)
 performs a batch operation.
void BatchAsync (AtomFeed feed, Uri batchUri, Object userData)
 takes a given feed, and does a batch post of that feed against the batchUri parameter. If that one is NULL it will try to use the batch link URI in the feed
void CancelAsync (object userData)
 this method cancels the corresponding async operation. It sends still a completed event, but that event will then have the cancel property set to true
void Delete (Uri uriTarget, string eTag)
void Delete (Uri uriTarget)
void Delete (AtomEntry entry)
 deletes an Atom entry object
void Delete< Y > (Y entry)
 deletes the Entry from the Server
Stream EntrySend (Uri feedUri, AtomEntry baseEntry, GDataRequestType type)
 Inserts an AtomBase entry against a Uri.
 Feed (Service service, FeedQuery q)
 constructs a new feed object based on a service and a query
 Feed (AtomFeed af)
 default constructor that takes the underlying atomfeed
 FeedRequest (RequestSettings settings)
 default constructor based on a RequestSettings object
AtomEntry Get (string entryUri)
 Returns a single Atom entry based upon its unique URI.
Feed< Y > Get< Y > (Feed< Y > feed, FeedRequestType operation)
 returns a new feed based on the operation passed in. This is useful if you either do not use autopaging, or want to move to previous parts of the feed, or get a refresh of the current feed
Feed< Y > Get< Y > (Uri uri)
 gets a feed object of type T
Feed< Y > Get< Y > (FeedQuery q)
 gets a feed object of type T
AtomEntry Insert (Uri uriTarget, Stream input, string contentType, string slugHeader)
 Simple insert for media resources.
TEntry Insert< TEntry > (Uri feedUri, TEntry entry)
 templated type safe verion of the interface
TEntry Insert< TEntry > (AtomFeed feed, TEntry entry)
 templated type safe version of Insert
Insert< Y > (Feed< Y > feed, Y entry)
 takes the given Entry and inserts its into the server
Insert< Y > (Uri address, Y entry)
 takes the given Entry and inserts its into the server
void InsertAsync (Uri feedUri, AtomEntry entry, Object userData)
 inserts the entry asynchronous, you need to supply a valid and unique token. Events will be send to the async delegates you setup on the service object
virtual void OnRequestFactoryChanged ()
 notifier if someone changes the requestfactory of the service. This will cause the service to set the versionnumber on the request factory to it's own
AtomFeed Query (FeedQuery feedQuery, DateTime ifModifiedSince)
 executes the query and returns an AtomFeed object tree
AtomFeed Query (FeedQuery feedQuery)
 executes the query and returns an AtomFeed object tree
Stream Query (Uri queryUri, string etag)
 the basic interface. Take a URI and just get it
Stream Query (Uri queryUri, DateTime ifModifiedSince)
 the basic interface. Take a URI and just get it
Stream Query (Uri queryUri)
 the basic interface. Take a URI and just get it
string QueryAuthenticationToken ()
 if the service is using a Google Request Factory it will use that assuming credentials are set to retrieve the authentication token for those credentials
void QueryFeedAync (Uri queryUri, DateTime ifModifiedSince, Object userData)
 the basic interface as an async version. This call will return directly and you need to rely on the events fired to figure out what happened.
Stream QueryOpenSearchRssDescription (Uri serviceUri)
 object QueryOpenSearchRssDescription()
void QueryStreamAync (Uri queryUri, DateTime ifModifiedSince, Object userData)
 the basic interface as an async version. This call will return directly and you need to rely on the events fired to figure out what happened. this version does not parse the response from the webserver but provides it to you in the event
Retrieve< Y > (FeedQuery query)
 returns a the entry the Uri pointed to
Retrieve< Y > (Uri entryUri)
 returns a the entry the Uri pointed to
Retrieve< Y > (Y entry)
 returns a refreshed version of the entry you passed in, by going back to the server and requesting this resource again
void SetAuthenticationToken (string token)
 if the service is using a Google Request Factory it will set the passed in token to the factory. NET CF does not support authsubtokens here
void setUserCredentials (String username, String password)
 Sets the credentials of the user to authenticate requests to the server.
Stream StreamSend (Uri targetUri, Stream inputStream, GDataRequestType type, string contentType, string slugHeader, string etag)
 this is a helper function for to send binary data to a resource it is not worth running the other insert/saves through here, as this would involve double buffering/copying of the bytes
Stream StreamSend (Uri targetUri, Stream inputStream, GDataRequestType type, string contentType, string slugHeader)
 this is a helper function for to send binary data to a resource it is not worth running the other insert/saves through here, as this would involve double buffering/copying of the bytes
void StreamSendAsync (Uri targetUri, Stream inputStream, GDataRequestType type, string contentType, string slugHeader, object userData)
 this is a helper function for to send binary data asyncronous to a resource
Stream StringSend (Uri targetUri, String payload, GDataRequestType type)
 this is a helper function for external utilities. It is not worth running the other insert/saves through here, as this would involve double buffering/copying of the bytes
override string ToString ()
 override for ToString, returns the Entries Title
AtomEntry Update (Uri uriTarget, Stream input, string contentType, string slugHeader)
 simple update for media resources
AtomEntry Update (AtomEntry entry)
 WebResponse Update(Uri updateUri, Stream entryStream, ICredentials credentials).
TEntry Update< TEntry > (TEntry entry)
 templated type safe verion of the interface
Update< Y > (Y entry)
 sends the data back to the server.
void UpdateAsync (AtomEntry entry, Object userData)
 updates the entry asynchronous, you need to supply a valid and unique token. Events will be send to the async delegates you setup on the service object

Protected Member Functions

virtual AtomFeed CreateFeed (Uri uriToUse)
 creates a new feed instance to be returned by Batch(), Query() and other operations
abstract void EnsureInnerObject ()
 needs to be subclassed to ensure the creation of the corrent AtomEntry based object
virtual void InitVersionInformation ()
 by default all services now use version 2 for the protocol. this needs to be overridden by a service to specify otherwise.
AtomEntry internalInsert (Uri feedUri, AtomEntry newEntry)
 internal Insert version to avoid recursion in the template versions
void OnNewExtensionElement (object sender, ExtensionElementEventArgs e)
 eventchaining. We catch this by the baseFeedParsers, which would not do anything with the gathered data. We pass the event up to the user, and if he did not dicscard it, we add the entry to our collection
void OnParsedNewEntry (object sender, FeedParserEventArgs e)
 eventchaining. We catch this by the baseFeedParsers, which would not do anything with the gathered data. We pass the event up to the user
virtual Feed< Y > PrepareFeed< Y > (FeedQuery q)
 creates a feed of Y object based on the query and the settings
void PrepareQuery (FeedQuery q)
 prepares the passed in query objects properties based on the settings
PrepareQuery< Y > (string uri)
 creates a query object and set's it up based on the settings object.
void PrepareService (Service s)
 prepares the passed in service by setting the authentication credentials and the timeout settings
void PrepareService ()
 prepares the created service based on the settings
void WriteInputStreamToRequest (Stream input, Stream output)
 write the current stream to an output stream this is primarily used to write data to the request stream

Properties

AppControl AppControl [get, set]
 returns the appControl sublement
AtomEntry AtomEntry [get, set]
 the original AtomEntry object that this object is standing in for
AtomFeed AtomFeed [get]
 returns the used feed object
string Author [get, set]
 returns the first author name in the atom.entry.authors collection
bool AutoPaging [get, set]
 if set to true will cause the feed to add more data when you iterate over it's entries
GDataBatchEntryData BatchData [get, set]
 this returns the batch data for the inner atom object
string Content [get, set]
 returns the string representation of the atom.content element
GDataCredentials Credentials [get, set]
 accessor method public ICredentials Credentials
IEnumerable< TEntries [get]
 returns the initial list of entries.This page is the data you got from the Requestobject and will remain constant. Unless you set AutoPaging to true, in that case: This will go back to the server and fetch data again if needed. Example. If you pagesize is 30, you get an initial set of 30 entries. While enumerating, when reaching 30, the code will go to the server and get the next 30 rows. It will continue to do so until the server reports no more rows available. Note that you should cache the entries returned in a list of your own if you want to access them more than once, as this one does no caching on it's own.
string Id [get, set]
 returns the Id of an entry
bool IsDraft [get]
 returns the appControl sublement
int Maximum [get, set]
 the maxium number of entries to be retrieved. This is normally setup using the RequestSettings when the feed is constructed.
int PageSize [get]
 returns the setup paging size of this feed. If you set AutoPaging to true this is the size that is used to get more results
int ProtocolMajor [get, set]
 returns the major protocol version number this element is working against.
int ProtocolMinor [get, set]
 returns the minor protocol version number this element is working against.
bool ReadOnly [get]
 returns true, if the entry has an edit link
IGDataRequestFactory RequestFactory [get, set]
 accessor method public IGDataRequest Request
string Self [get]
 returns the value of the self uri as a string
T Service [get, set]
 returns the service instance that is used
string ServiceIdentifier [get]
 this returns the string that the services uses to identify the google service to use when authentication with Google is required. Examples are "cl" for calendar, e.g.
RequestSettings Settings [get]
 the Settings property returns the RequestSettings object that was used to construct this FeedRequest. It can be used to alter properties like AutoPaging etc, inbetween Feed creations.
int StartIndex [get]
 returns the position in the real feed of the first entry in this feed
string Summary [get, set]
 returns the string representation of the atom.Summary element
virtual string Title [get, set]
 the title of the Entry.
int TotalResults [get]
 returns the number of entries the server believes the feed holds
DateTime Updated [get, set]
 just a thin layer on top of the existing updated of the underlying atomentry

Events

AsyncOperationCompletedEventHandler AsyncOperationCompleted
 eventhandler, fired when an async operation is completed
AsyncOperationProgressEventHandler AsyncOperationProgress
 eventhandler, fired when an async operation reports progress
FeedParserEventHandler NewAtomEntry
 holds the hooks for the eventing in the feedparser
ExtensionElementEventHandler NewExtensionElement
 eventhandler, when the parser finds a new extension element-> mirrored from underlying parser
ServiceEventHandler NewFeed
 eventhandler, when the service needs to create a new feed

Private Attributes

AtomFeed af
T atomService
int maximum = -1
int numberRetrieved = 0
bool paging
FeedQuery query
Service service
RequestSettings settings

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index