DmapShare

DmapShare — An abstract parent to the various share classes.

Functions

Properties

guint auth-method Read / Write
DmapContainerDb * container-db Read / Write / Construct Only
DmapDb * db Read / Write / Construct Only
char * name Read / Write
char * password Read / Write
guint revision-number Read / Write
SoupServer * server Read
char * transcode-mimetype Read / Write / Construct Only
GStrv txt-records Read / Write

Signals

void error Run First

Types and Values

Object Hierarchy

    GEnum
    ╰── DmapShareAuthMethod
    GObject
    ╰── DmapShare
        ├── DmapAvShare
        ├── DmapControlShare
        ╰── DmapImageShare

Description

DmapShare provides an abstract parent to the DmapAvShare, DmapControlShare, and DmapImageShare classes.

Functions

dmap_share_serve ()

gboolean
dmap_share_serve (DmapShare *share,
                  GError **error);

Begin serving the service defined by share. A program will normally also call dmap_share_publish.

Parameters

share

a DmapShare instance.

 

error

return location for a GError, or NULL.

 

Returns

TRUE if serving succeeds, else FALSE with error set.


dmap_share_publish ()

gboolean
dmap_share_publish (DmapShare *share,
                    GError **error);

Publish the availability of the given share using mDNS-SD.

Parameters

share

a DmapShare instance.

 

error

return location for a GError, or NULL.

 

Returns

TRUE if publishing succeeds, else FALSE.


dmap_share_free_filter ()

void
dmap_share_free_filter (GSList *filter);

Free the given filter list.

Parameters

filter

The filter list to free.

[element-type GSList]

dmap_share_emit_error ()

void
dmap_share_emit_error (DmapShare *share,
                       gint code,
                       const gchar *format,
                       ...);

Parameters

share

a DmapShare instance.

 

code

error code.

 

format

printf()-style format for error message

 

...

parameters for message format

 

Types and Values

DmapMetaDataMap

typedef struct DmapMetaDataMap DmapMetaDataMap;

enum DmapShareAuthMethod

Members

DMAP_SHARE_AUTH_METHOD_NONE

   

DMAP_SHARE_AUTH_METHOD_NAME_AND_PASSWORD

   

DMAP_SHARE_AUTH_METHOD_PASSWORD

   

DmapBits

typedef guint64 DmapBits;

struct DmapMlclBits

struct DmapMlclBits {
	GNode *mlcl;
	DmapBits bits;
	DmapShare *share;
};

Property Details

The “auth-method” property

  “auth-method”              guint

Authentication method.

Owner: DmapShare

Flags: Read / Write

Allowed values: <= 2

Default value: 0


The “container-db” property

  “container-db”             DmapContainerDb *

Container DB object.

Owner: DmapShare

Flags: Read / Write / Construct Only


The “db” property

  “db”                       DmapDb *

DB object.

Owner: DmapShare

Flags: Read / Write / Construct Only


The “name” property

  “name”                     char *

Share Name.

Owner: DmapShare

Flags: Read / Write

Default value: NULL


The “password” property

  “password”                 char *

Authentication password.

Owner: DmapShare

Flags: Read / Write

Default value: NULL


The “revision-number” property

  “revision-number”          guint

Revision number.

Owner: DmapShare

Flags: Read / Write

Allowed values: <= G_MAXINT

Default value: 0


The “server” property

  “server”                   SoupServer *

Soup server.

Owner: DmapShare

Flags: Read


The “transcode-mimetype” property

  “transcode-mimetype”       char *

Set mimetype of stream after transcoding.

Owner: DmapShare

Flags: Read / Write / Construct Only

Default value: NULL


The “txt-records” property

  “txt-records”              GStrv

Set TXT-Records used for MDNS publishing.

Owner: DmapShare

Flags: Read / Write

Signal Details

The “error” signal

void
user_function (DmapShare *dmapshare,
               gpointer   arg1,
               gpointer   user_data)

Flags: Run First