GUPnPProtocolInfo

## GUPnPProtocolInfo GUPnPProtocolInfo — UPnP AV ProtocolInfo |

## Synopsis

                        GUPnPProtocolInfo;
    enum                GUPnPDLNAConversion;
    enum                GUPnPDLNAFlags;
    enum                GUPnPDLNAOperation;
    GUPnPProtocolInfo * gupnp_protocol_info_new             (void);
    GUPnPProtocolInfo * gupnp_protocol_info_new_from_string (const char *protocol_info,
                                                             GError **error);
    char *              gupnp_protocol_info_to_string       (GUPnPProtocolInfo *info);
    gboolean            gupnp_protocol_info_is_compatible   (GUPnPProtocolInfo *info1,
                                                             GUPnPProtocolInfo *info2);
    void                gupnp_protocol_info_set_protocol    (GUPnPProtocolInfo *info,
                                                             const char *protocol);
    void                gupnp_protocol_info_set_network     (GUPnPProtocolInfo *info,
                                                             const char *network);
    void                gupnp_protocol_info_set_mime_type   (GUPnPProtocolInfo *info,
                                                             const char *mime_type);
    void                gupnp_protocol_info_set_dlna_profile
                                                            (GUPnPProtocolInfo *info,
                                                             const char *profile);
    void                gupnp_protocol_info_set_play_speeds (GUPnPProtocolInfo *info,
                                                             const char **speeds);
    void                gupnp_protocol_info_set_dlna_conversion
                                                            (GUPnPProtocolInfo *info,
                                                             GUPnPDLNAConversion conversion);
    void                gupnp_protocol_info_set_dlna_operation
                                                            (GUPnPProtocolInfo *info,
                                                             GUPnPDLNAOperation operation);
    void                gupnp_protocol_info_set_dlna_flags  (GUPnPProtocolInfo *info,
                                                             GUPnPDLNAFlags flags);
    const char *        gupnp_protocol_info_get_protocol    (GUPnPProtocolInfo *info);
    const char *        gupnp_protocol_info_get_network     (GUPnPProtocolInfo *info);
    const char *        gupnp_protocol_info_get_mime_type   (GUPnPProtocolInfo *info);
    const char *        gupnp_protocol_info_get_dlna_profile
                                                            (GUPnPProtocolInfo *info);
    const char **       gupnp_protocol_info_get_play_speeds (GUPnPProtocolInfo *info);
    GUPnPDLNAConversion gupnp_protocol_info_get_dlna_conversion
                                                            (GUPnPProtocolInfo *info);
    GUPnPDLNAOperation  gupnp_protocol_info_get_dlna_operation
                                                            (GUPnPProtocolInfo *info);
    GUPnPDLNAFlags      gupnp_protocol_info_get_dlna_flags  (GUPnPProtocolInfo *info);

## Object Hierarchy

      GObject
       +----GUPnPProtocolInfo

## Properties

      "dlna-conversion"          GUPnPDLNAConversion   : Read / Write
      "dlna-flags"               GUPnPDLNAFlags        : Read / Write
      "dlna-operation"           GUPnPDLNAOperation    : Read / Write
      "dlna-profile"             gchar*                : Read / Write
      "mime-type"                gchar*                : Read / Write
      "network"                  gchar*                : Read / Write
      "play-speeds"              GStrv                 : Read / Write
      "protocol"                 gchar*                : Read / Write

## Description

GUPnPProtocolInfo provides a convenient API to deal with ProtocolInfo strings used in UPnP AV specifications.

## Details

### GUPnPProtocolInfo

    typedef struct _GUPnPProtocolInfo GUPnPProtocolInfo;

### enum GUPnPDLNAConversion

    typedef enum {
            GUPNP_DLNA_CONVERSION_NONE       = 0,
            GUPNP_DLNA_CONVERSION_TRANSCODED = 1
    } GUPnPDLNAConversion;

The DLNA conversion flags for a resource.

`GUPNP_DLNA_CONVERSION_NONE` | Content is in original source format
`GUPNP_DLNA_CONVERSION_TRANSCODED` | Content is transcoded

### enum GUPnPDLNAFlags

    typedef enum {
            GUPNP_DLNA_FLAGS_NONE                      = 0,
            GUPNP_DLNA_FLAGS_SENDER_PACED              = (1 << 31),
            GUPNP_DLNA_FLAGS_TIME_BASED_SEEK           = (1 << 30),
            GUPNP_DLNA_FLAGS_BYTE_BASED_SEEK           = (1 << 29),
            GUPNP_DLNA_FLAGS_PLAY_CONTAINER            = (1 << 28),
            GUPNP_DLNA_FLAGS_S0_INCREASE               = (1 << 27),
            GUPNP_DLNA_FLAGS_SN_INCREASE               = (1 << 26),
            GUPNP_DLNA_FLAGS_RTSP_PAUSE                = (1 << 25),
            GUPNP_DLNA_FLAGS_STREAMING_TRANSFER_MODE   = (1 << 24),
            GUPNP_DLNA_FLAGS_INTERACTIVE_TRANSFER_MODE = (1 << 23),
            GUPNP_DLNA_FLAGS_BACKGROUND_TRANSFER_MODE  = (1 << 22),
            GUPNP_DLNA_FLAGS_CONNECTION_STALL          = (1 << 21),
            GUPNP_DLNA_FLAGS_DLNA_V15                  = (1 << 20)
    } GUPnPDLNAFlags;

The miscellaneous operations supported by a resource. For details on these flags please refer to section 7.3.37.2 of DLNA Networked Device Interoperability Guidelines Volume 1, October 2006.

`GUPNP_DLNA_FLAGS_NONE` | No flags
`GUPNP_DLNA_FLAGS_SENDER_PACED` | Content source is the clock source during transport
`GUPNP_DLNA_FLAGS_TIME_BASED_SEEK` | Limited Operation: time-seek supported
`GUPNP_DLNA_FLAGS_BYTE_BASED_SEEK` | Limited Operation: byte-seek supported
`GUPNP_DLNA_FLAGS_PLAY_CONTAINER` | Resource supports 'Container Playback'
`GUPNP_DLNA_FLAGS_S0_INCREASE` | Content does not have a fixed beginning
`GUPNP_DLNA_FLAGS_SN_INCREASE` | Content does not have a fixed end
`GUPNP_DLNA_FLAGS_RTSP_PAUSE` | RTSP resource supports pausing of media transfer
`GUPNP_DLNA_FLAGS_STREAMING_TRANSFER_MODE` | Streaming transfer mode supported
`GUPNP_DLNA_FLAGS_INTERACTIVE_TRANSFER_MODE` | Interactive transfer mode supported
`GUPNP_DLNA_FLAGS_BACKGROUND_TRANSFER_MODE` | Background transfer mode supported
`GUPNP_DLNA_FLAGS_CONNECTION_STALL` | No content transfer when paused.
`GUPNP_DLNA_FLAGS_DLNA_V15` | DLNAv1.5 version flag

### enum GUPnPDLNAOperation

    typedef enum {
            GUPNP_DLNA_OPERATION_NONE     = 0x00,
            GUPNP_DLNA_OPERATION_RANGE    = 0x01,
            GUPNP_DLNA_OPERATION_TIMESEEK = 0x10
    } GUPnPDLNAOperation;

The seek operations supported by a resource.

`GUPNP_DLNA_OPERATION_NONE` | Resource does not support seeking of any type
`GUPNP_DLNA_OPERATION_RANGE` | Resource supports byte-seek
`GUPNP_DLNA_OPERATION_TIMESEEK` | Resource supports time-seek

### gupnp_protocol_info_new ()

    GUPnPProtocolInfo * gupnp_protocol_info_new             (void);

Returns : | A new GUPnPProtocolInfo object. Unref after usage.

### gupnp_protocol_info_new_from_string ()

    GUPnPProtocolInfo * gupnp_protocol_info_new_from_string (const char *protocol_info,
                                                             GError **error);

Parses the `protocol_info` string and creates a new GUPnPProtocolInfo object as a result.

`protocol_info` : | The protocol info string
`error` : | The location where to store any error, or NULL
Returns : | A new GUPnPProtocolInfo object. Unref after usage.

### gupnp_protocol_info_to_string ()

    char *              gupnp_protocol_info_to_string       (GUPnPProtocolInfo *info);

Provides the string representation of `info`.

`info` : | The GUPnPProtocolInfo
Returns : | String representation of `info`. g_free after usage.

### gupnp_protocol_info_is_compatible ()

    gboolean            gupnp_protocol_info_is_compatible   (GUPnPProtocolInfo *info1,
                                                             GUPnPProtocolInfo *info2);

Checks if the given protocolInfo string is compatible with `info`.

`info1` : | The first GUPnPProtocolInfo
`info2` : | The second GUPnPProtocolInfo
Returns : | TRUE if `protocol_info` is compatible with `info`, otherwise FALSE.

### gupnp_protocol_info_set_protocol ()

    void                gupnp_protocol_info_set_protocol    (GUPnPProtocolInfo *info,
                                                             const char *protocol);

Set the protocol of this info.

`info` : | A GUPnPProtocolInfo
`protocol` : | The protocol string
Returns : | None.

### gupnp_protocol_info_set_network ()

    void                gupnp_protocol_info_set_network     (GUPnPProtocolInfo *info,
                                                             const char *network);

Set the network this info is associated with.

`info` : | A GUPnPProtocolInfo
`network` : | The network string
Returns : | None.

### gupnp_protocol_info_set_mime_type ()

    void                gupnp_protocol_info_set_mime_type   (GUPnPProtocolInfo *info,
                                                             const char *mime_type);

Set the MIME-type of this info.

`info` : | A GUPnPProtocolInfo
`mime_type` : | The MIME-type string
Returns : | None.

### gupnp_protocol_info_set_dlna_profile ()

    void                gupnp_protocol_info_set_dlna_profile
                                                            (GUPnPProtocolInfo *info,
                                                             const char *profile);

Set the DLNA profile of this info.

`info` : | A GUPnPProtocolInfo
`profile` : | The DLNA profile string
Returns : | None.

### gupnp_protocol_info_set_play_speeds ()

    void                gupnp_protocol_info_set_play_speeds (GUPnPProtocolInfo *info,
                                                             const char **speeds);

Set the allowed play speeds on this info in the form of array of strings.

`info` : | A GUPnPProtocolInfo
`speeds` : | The allowed play speeds
Returns : | None.

### gupnp_protocol_info_set_dlna_conversion ()

    void                gupnp_protocol_info_set_dlna_conversion
                                                            (GUPnPProtocolInfo *info,
                                                             GUPnPDLNAConversion conversion);

Set the DLNA conversion flags.

`info` : | A GUPnPProtocolInfo
`conversion` : | The bitwise OR of one or more DLNA conversion flags
Returns : | None.

### gupnp_protocol_info_set_dlna_operation ()

    void                gupnp_protocol_info_set_dlna_operation
                                                            (GUPnPProtocolInfo *info,
                                                             GUPnPDLNAOperation operation);

Set the DLNA operation flags.

`info` : | A GUPnPProtocolInfo
`operation` : | The bitwise OR of one or more DLNA operation flags
Returns : | None.

### gupnp_protocol_info_set_dlna_flags ()

    void                gupnp_protocol_info_set_dlna_flags  (GUPnPProtocolInfo *info,
                                                             GUPnPDLNAFlags flags);

Set the gereric DLNA flags.

`info` : | A GUPnPProtocolInfo
`flags` : | The bitwise OR of one or more generic DLNA flags
Returns : | None.

### gupnp_protocol_info_get_protocol ()

    const char *        gupnp_protocol_info_get_protocol    (GUPnPProtocolInfo *info);

Get the protocol of this info.

`info` : | A GUPnPProtocolInfo
Returns : | The protocol of this info or `NULL`. This string should not be freed.

### gupnp_protocol_info_get_network ()

    const char *        gupnp_protocol_info_get_network     (GUPnPProtocolInfo *info);

Get the network this info is associated with.

`info` : | A GUPnPProtocolInfo
Returns : | The network string or `NULL`. This string should not be freed.

### gupnp_protocol_info_get_mime_type ()

    const char *        gupnp_protocol_info_get_mime_type   (GUPnPProtocolInfo *info);

Get the MIME-type of this info.

`info` : | A GUPnPProtocolInfo
Returns : | The MIME-type of this info or `NULL`. This string should not be freed.

### gupnp_protocol_info_get_dlna_profile ()

    const char *        gupnp_protocol_info_get_dlna_profile
                                                            (GUPnPProtocolInfo *info);

Get the DLNA profile of this info.

`info` : | A GUPnPProtocolInfo
Returns : | The DLNA profile of this info or `NULL`. This string should not be freed.

### gupnp_protocol_info_get_play_speeds ()

    const char **       gupnp_protocol_info_get_play_speeds (GUPnPProtocolInfo *info);

Get the allowed play speeds on this info in the form of array of strings.

`info` : | A GUPnPProtocolInfo
Returns : | The allowed play speeds as array of strings or `NULL`. This return array and it's content must not be modified or freed. [transfer none]

### gupnp_protocol_info_get_dlna_conversion ()

    GUPnPDLNAConversion gupnp_protocol_info_get_dlna_conversion
                                                            (GUPnPProtocolInfo *info);

Get the DLNA conversion flags.

`info` : | A GUPnPProtocolInfo
Returns : | The DLNA conversion flags.

### gupnp_protocol_info_get_dlna_operation ()

    GUPnPDLNAOperation  gupnp_protocol_info_get_dlna_operation
                                                            (GUPnPProtocolInfo *info);

Get the DLNA operation flags.

`info` : | A GUPnPProtocolInfo
Returns : | The DLNA operation flags.

### gupnp_protocol_info_get_dlna_flags ()

    GUPnPDLNAFlags      gupnp_protocol_info_get_dlna_flags  (GUPnPProtocolInfo *info);

Get the gereric DLNA flags.

`info` : | A GUPnPProtocolInfo
Returns : | The generic DLNA flags.

## Property Details

### The `"dlna-conversion"` property

      "dlna-conversion"          GUPnPDLNAConversion   : Read / Write

The DLNA conversion flags.

### The `"dlna-flags"` property

      "dlna-flags"               GUPnPDLNAFlags        : Read / Write

Various generic DLNA flags.

### The `"dlna-operation"` property

      "dlna-operation"           GUPnPDLNAOperation    : Read / Write

The DLNA operation flags.

### The `"dlna-profile"` property

      "dlna-profile"             gchar*                : Read / Write

The DLNA profile of this info.

Default value: NULL

### The `"mime-type"` property

      "mime-type"                gchar*                : Read / Write

The MIME-type of this info.

Default value: NULL

### The `"network"` property

      "network"                  gchar*                : Read / Write

The network this info is associated with.

Default value: NULL

### The `"play-speeds"` property

      "play-speeds"              GStrv                 : Read / Write

The allowed play speeds on this info in the form of array of strings.

### The `"protocol"` property

      "protocol"                 gchar*                : Read / Write

The protocol of this info.

Default value: NULL