Commit e70abfbe authored by W. Michael Petullo's avatar W. Michael Petullo

Add hash to DMAP records

Signed-off-by: 's avatarW. Michael Petullo <mike@flyn.org>
parent 7ac190fd
......@@ -39,6 +39,13 @@ daap_record_init (DAAPRecordIface * iface)
NULL,
G_PARAM_READWRITE));
g_object_interface_install_property (iface,
g_param_spec_pointer
("hash",
"Hash of media file contents",
"Hash of media file contents",
G_PARAM_READWRITE));
g_object_interface_install_property (iface,
g_param_spec_string
("title", "Song title",
......
......@@ -23,6 +23,8 @@
#include <glib.h>
#define DMAP_HASH_SIZE 16
G_BEGIN_DECLS
typedef struct DMAPHashContext
......
......@@ -62,7 +62,7 @@ dmap_record_to_blob (DMAPRecord * record)
return DMAP_RECORD_GET_INTERFACE (record)->to_blob (record);
}
DMAPRecord *
gboolean
dmap_record_set_from_blob (DMAPRecord * record, GByteArray * blob)
{
return DMAP_RECORD_GET_INTERFACE (record)->set_from_blob (record,
......
......@@ -66,7 +66,7 @@ struct _DMAPRecordIface
GTypeInterface parent;
GByteArray *(*to_blob) (DMAPRecord * record);
DMAPRecord *(*set_from_blob) (DMAPRecord * record, GByteArray * blob);
gboolean (*set_from_blob) (DMAPRecord * record, GByteArray * blob);
};
typedef unsigned long long bitwise;
......@@ -91,12 +91,13 @@ GByteArray *dmap_record_to_blob (DMAPRecord * record);
/**
* dmap_record_from_blob:
* @blob: A byte array representation of a record.
* @record: The record to set.
* @blob: A byte array representation of a record.
*
* Returns: The record.
* Returns: True on success, else false.
*/
DMAPRecord *dmap_record_set_from_blob (DMAPRecord * record,
GByteArray * blob);
gboolean dmap_record_set_from_blob (DMAPRecord * record,
GByteArray * blob);
#endif /* __DMAP_RECORD_H */
......
......@@ -39,6 +39,13 @@ dpap_record_init (DPAPRecordIface * iface)
NULL,
G_PARAM_READWRITE));
g_object_interface_install_property (iface,
g_param_spec_pointer
("hash",
"Hash of media file contents",
"Hash of media file contents",
G_PARAM_READWRITE));
/* iTunes does not require to this to match the datatype for the image
* to be displayed (set to "JPEG" and served a PNG). I think this is
* for display to the user only.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment