Sun Java System Calendar Server 6 2005Q4 Developer's Guide

API: csIQualifiedCalidLookup

Implement the methods in this interface to augment or override the default method of retrieving the calendar ID of the qualified URL passed in.

Methods

The csICalendarLookup implements two methods:

Method: FindCalid

Returns a calendar ID for the qualified URL. 

Method: Init

Confirms that the interface was found and registered. 

Description

Retrieves the calendar ID of the qualified URL passed in to it. If the calid is not found, the command returns an error.

Method: FindCalid

Purpose

Finds the calendar ID for the URL specified.

Syntax

PRUint32 FindCalid (char* pQualifiedURL,
                    char** ppCalidOut,
                    PRInt32 *piCalidSize,
                    PRInt32 *aReturnCode)=0;

Parameters

The method has the following parameters:

pQualifiedURL

The URL to search on. 

ppCalidOut

A pointer to the address of the calid found.

piCalidSize

Size of the calid returned.

aReturnCode

On return, contains a constant that determines whether the server should continue with the default, or with the override processing. 

One of the following constants: 

NS_CONTINUE_DEFAULT_PROCESSING

NS_OVERRIDE_DEFAULT_PROCESSING

Returns

The calid for the qualified URL passed in.

Description

Uses the qualified URL pointer passed to it to perform a search of the calendar ID database. If it finds a match, it returns a pointer to the address of the calid and an integer with the size of the calid

Method: Init

Purpose

Confirms that the interface has been registered, and provides a reference to the server.

Syntax

PRUint32 Init (nsISupports *aServer)=0;

Parameters

The method has the following parameter:

aServer

On return, contains a reference to the server with which the module is registered. 

Returns

NS_OK on success, non-zero error code on failure.

Description

The server calls this method after finding and registering the interface on module load, to confirm that the operation was successful. You can use the pointer returned in aServer to make calls out to the server.