Gjsify LogoGjsify Logo

Index

Enumerations

Classes

Interfaces

Type Aliases

Variables

Functions

Type Aliases

KeyID: object

Variables

CONFIG_KEY_APIKEY: string
CONFIG_KEY_APIKEY_BLOB: string
CONFIG_KEY_APISECRET: string
CONFIG_KEY_APITOKEN: string
CONFIG_KEY_PASSWORD: string
CONFIG_KEY_PLUGIN: string
CONFIG_KEY_SOURCE: string
CONFIG_KEY_USERNAME: string
KEYID_FORMAT: string
MEDIA_PLUGIN_AUTHOR: string
MEDIA_PLUGIN_DESCRIPTION: string
MEDIA_PLUGIN_LICENSE: string
MEDIA_PLUGIN_NAME: string
MEDIA_PLUGIN_SITE: string
MEDIA_PLUGIN_VERSION: string
METADATA_KEY_CHILDCOUNT_UNKNOWN: number
PADDING: number
PADDING_SMALL: number
PLUGIN_LIST_VAR: string
PLUGIN_PATH_VAR: string
PLUGIN_RANKS_VAR: string
SOURCE_REMAINING_UNKNOWN: number

Functions

  • init(argv?: string[]): string[] | null
  • Initializes the Grilo library

    Parameters

    • Optional argv: string[]

      list of arguments

    Returns string[] | null

  • log_configure(config: string): void
  • Configure a set of log domains. The default configuration is to display warning and error messages only for all the log domains.

    The configuration string follows the following grammar:

    |[ config-list: config | config ',' config-list config: domain ':' level domain: '' | [a-zA-Z0-9]+ level: '' | '-' | named-level | num-level named-level: "none" | "error" | "warning" | "message" | "info" | "debug" num-level: [0-5]



    examples:
    <itemizedlist>
    <listitem><para>"*:*": maximum verbosity for all the log domains</para>
    </listitem>
    <listitem><para>"*:-": don't print any message</para></listitem>
    <listitem><para>"media-source:debug,metadata-source:debug": prints debug,
    info, message warning and error messages for the media-source and
    metadata-source log domains</para></listitem>
    </itemizedlist>

    <note>It's possible to override the log configuration at runtime by
    defining the GRL_DEBUG environment variable to a configuration string
    as described above</note>
    @param config A string describing the wanted log configuration

    Parameters

    • config: string

    Returns void

  • marshal_VOID__BOXED_ENUM_BOOLEAN(closure: TClosure<any, any>, return_value: any, n_param_values: number, param_values: any, invocation_hint: object, marshal_data: object): void
  • Parameters

    • closure: TClosure<any, any>
    • return_value: any
    • n_param_values: number
    • param_values: any
    • invocation_hint: object
    • marshal_data: object

    Returns void

  • metadata_key_get_desc(key: ParamSpec): string
  • metadata_key_get_name(key: ParamSpec): string
  • multiple_cancel(search_id: number): void
  • Cancel a running multiple search by issuing a cancel operation on each source involved involved in the operation.

    Parameters

    • search_id: number

      the identifier of the multiple operation to cancel

    Returns void

  • Goes though all available media sources until it finds one capable of constructing a GrlMedia object representing the media resource exposed by uri.

    This method is asynchronous.

    Parameters

    • uri: string

      A URI that can be used to identify a media resource

    • keys: object[]

      List of metadata keys we want to obtain.

    • flags: MetadataResolutionFlags

      the operation flags

    • callback: MediaSourceMetadataCb

      the user defined callback

    Returns void

  • Search for text in all the sources specified in sources.

    If text is NULL then NULL-text searchs will be used for each searchable plugin (see #grl_media_source_search for more details).

    This method is asynchronous.

    Parameters

    • sources: MediaSource[]

      a #GList of #GrlMediaSources to search from (%NULL for all searchable sources)

    • text: string

      the text to search for

    • keys: ParamSpec[]

      the #GList of #GrlKeyID to retrieve

    • count: number

      the maximum number of elements to retrieve

    • flags: MetadataResolutionFlags

      the operation flags

    • callback: MediaSourceResultCb

      the user defined callback

    Returns number

  • Search for text in all the sources specified in sources.

    This method is synchronous.

    Parameters

    • sources: MediaSource[]

      a #GList of #GrlMediaSources where to search from (%NULL for all available sources with search capability)

    • text: string

      the text to search for

    • keys: ParamSpec[]

      the #GList of #GrlKeyID to retrieve

    • count: number

      the maximum number of elements to retrieve

    • flags: MetadataResolutionFlags

      the operation flags

    Returns Grl.Media[]

  • operation_cancel(operation_id: number): void
  • Cancel an operation.

    Parameters

    • operation_id: number

      the identifier of a running operation

    Returns void

  • operation_get_data(operation_id: number): object
  • Obtains the previously attached data

    Parameters

    • operation_id: number

      the identifier of a running operation

    Returns object

  • operation_set_data(operation_id: number, user_data: object): void
  • Attach a pointer to the specific operation.

    Parameters

    • operation_id: number

      the identifier of a running operation

    • user_data: object

      the data to attach

    Returns void

  • paging_translate(skip: number, count: number, max_page_size: number, page_size: number, page_number: number, internal_offset: number): void
  • Grilo browsing implements a paging mechanism through skip and count values.

    But there are some services (like Jamendo or Flickr) where paging is done through a page number and page size: user request all elements in a page, specifying in most cases what is the page size.

    This function is a helper for this task, computing from skip and count what is the optimal value of page size (limited by max_page_size), which page should the user request, and where requested data start inside the page.

    By optimal we mean that it computes those values so only one page is required to satisfy the data, using the smallest page size. If user is limiting page size, then more requests to services might be needed. But still page size will be an optimal value.

    Parameters

    • skip: number

      number of elements to skip

    • count: number

      number of elements to retrieve

    • max_page_size: number

      maximum value for page size

    • page_size: number

      optimal page size

    • page_number: number

      page which contain the first element to retrieve (starting at 1)

    • internal_offset: number

      in the page_number, offset where first element can be found (starting at 0)

    Returns void

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method