set_default_for_extension_name


Description:

public void set_default_for_extension_name (string extension_name, Source? default_source)

This is a convenience function to set a default Source based on extension_name.

This only works with a subset of extension names.

If extension_name is SOURCE_EXTENSION_ADDRESS_BOOK, the function sets default_source as the default address book. If default_source is null, the default address book is reset to the built-in address book.

If extension_name is SOURCE_EXTENSION_CALENDAR , the function sets default_source as the default calendar. If default_source is null, the default calendar is reset to the built-in calendar.

If extension_name is SOURCE_EXTENSION_MAIL_ACCOUNT, the function sets default_source as the default mail account. If default_source is null, the default mail account is reset to the built-in mail account.

If extension_name is SOURCE_EXTENSION_MAIL_IDENTITY, the function sets default_source as the default mail identity. If default_source is null, the next request for the default mail identity will return the mail identity named by the default mail account.

If extension_name is SOURCE_EXTENSION_MEMO_LIST , the function sets default_source as the default memo list. If default_source is null, the default memo list is reset to the built-in memo list.

If extension_name is SOURCE_EXTENSION_TASK_LIST , the function sets default_source as the default task list. If default_source is null, the default task list is reset to the built-in task list.

For all other values of extension_name, the function does nothing.

Parameters:

this

an SourceRegistry

extension_name

an extension name

default_source

an Source, or null