Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Public Attributes
calIGoogleRequest Interface Reference

import "calIGoogleRequest.idl";

Inheritance diagram for calIGoogleRequest:
Inheritance graph
[legend]
Collaboration diagram for calIGoogleRequest:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void setUploadData (in AUTF8String aContentType, in AUTF8String aData)
 Set up some upload data using the given content type.
void addQueryParameter (in AUTF8String aKey, in AUTF8String aValue)
 Adds a query parameter to the request.
void commit (in calIGoogleSession aSession)
 Run the request, using the specified session.
void fail (in PRUint32 aCode, in AUTF8String aMessage)
 Tell listeners that the operation failed.
void succeed (in AUTF8String aMessage)
 Tell listeners that the operation succeeded.
void cancel (in nsIVariant aStatus)
 Cancels a pending request and changes status.

Public Attributes

const unsigned long LOGIN = 0
const unsigned long ADD = 1
const unsigned long MODIFY = 2
const unsigned long DELETE = 3
const unsigned long GET = 4
attribute PRUint32 type
 The type of request.
attribute AUTF8String uri
 The request uri string.
attribute calIOperationListener operationListener
 The operation listener.
attribute
calIGenericOperationListener 
responseListener
 The response listener.
attribute calIGoogleCalendar calendar
 The calendar that initiated the request.
attribute calICalendar destinationCal
 The destination calendar, used for synchronization runs.
attribute boolean reauthenticate
 If set to false, an authentication failure should not cause any dialogs to show up that cause reauthentication, but the failure should be returned directly.
attribute calIDateTime itemRangeStart
 Various options to be carried through to the response listener.
attribute calIDateTime itemRangeEnd
attribute unsigned long itemFilter
attribute AUTF8String itemId
attribute calIItemBase newItem
 For add/modify/delete item requests, these contain the old and new items.
attribute calIItemBase oldItem
readonly attribute AUTF8String id
 Id for easy management of pending requests.
readonly attribute boolean isPending
 Determines whether the request is pending, i.e.
readonly attribute nsIVariant status
 Status of the request, e.g.

Detailed Description

Definition at line 50 of file calIGoogleRequest.idl.


Member Function Documentation

void calIGoogleRequest::addQueryParameter ( in AUTF8String  aKey,
in AUTF8String  aValue 
)

Adds a query parameter to the request.

These will be escaped.

Parameters:
aKeyThe key of the query parameter.
aValueThe value of the query parameter.
void calIOperation::cancel ( in nsIVariant  aStatus) [inherited]

Cancels a pending request and changes status.

Parameters:
aStatusoperation status to be set; defaults to calIErrors.OPERATION_CANCELLED if null

Run the request, using the specified session.

Parameters:
aSessionThe session to request with.
void calIGoogleRequest::fail ( in PRUint32  aCode,
in AUTF8String  aMessage 
)

Tell listeners that the operation failed.

Parameters:
aCodeThe error code to use.
aMessageThe error message to use.
void calIGoogleRequest::setUploadData ( in AUTF8String  aContentType,
in AUTF8String  aData 
)

Set up some upload data using the given content type.

Parameters:
aContentTypeThe value of the content type header to be set.
aDataThe Data to be uploaded.
void calIGoogleRequest::succeed ( in AUTF8String  aMessage)

Tell listeners that the operation succeeded.

Parameters:
aMessageThe error message to use.

Member Data Documentation

Definition at line 53 of file calIGoogleRequest.idl.

The calendar that initiated the request.

Definition at line 84 of file calIGoogleRequest.idl.

Definition at line 55 of file calIGoogleRequest.idl.

The destination calendar, used for synchronization runs.

Definition at line 89 of file calIGoogleRequest.idl.

Definition at line 56 of file calIGoogleRequest.idl.

readonly attribute AUTF8String calIOperation::id [inherited]

Id for easy management of pending requests.

Definition at line 46 of file calIOperation.idl.

Determines whether the request is pending, i.e.

has not been completed.

Definition at line 51 of file calIOperation.idl.

Definition at line 108 of file calIGoogleRequest.idl.

Definition at line 109 of file calIGoogleRequest.idl.

Definition at line 107 of file calIGoogleRequest.idl.

Various options to be carried through to the response listener.

XXX The corresponding options are not set up automatically just by setting these options. You still need to use addQueryParameter to filter by item range or other property.

Definition at line 106 of file calIGoogleRequest.idl.

Definition at line 52 of file calIGoogleRequest.idl.

Definition at line 54 of file calIGoogleRequest.idl.

For add/modify/delete item requests, these contain the old and new items.

Definition at line 114 of file calIGoogleRequest.idl.

Definition at line 115 of file calIGoogleRequest.idl.

The operation listener.

This is not called by the request object, but can be used by the response listener to call the original listener that caused the request

Definition at line 73 of file calIGoogleRequest.idl.

If set to false, an authentication failure should not cause any dialogs to show up that cause reauthentication, but the failure should be returned directly.

This attribute defaults to true.

Definition at line 98 of file calIGoogleRequest.idl.

The response listener.

This will be called as soon as the request to google has completed.

Definition at line 79 of file calIGoogleRequest.idl.

Status of the request, e.g.

NS_OK while pending or after successful completion, or NS_ERROR_FAILED when failed.

Definition at line 57 of file calIOperation.idl.

The type of request.

Must be one of the above constants.

Definition at line 61 of file calIGoogleRequest.idl.

The request uri string.

Definition at line 66 of file calIGoogleRequest.idl.


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