mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-28 08:05:56 -05:00
[outputs] Remove outputs_authorize()
Replaced by outputs_device_authorize()
This commit is contained in:
parent
3cca778419
commit
d6ec6afb5b
@ -1160,16 +1160,6 @@ outputs_metadata_purge(void)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
outputs_authorize(enum output_types type, const char *pin)
|
||||
{
|
||||
if (outputs[type]->disabled)
|
||||
return;
|
||||
|
||||
if (outputs[type]->authorize)
|
||||
outputs[type]->authorize(pin);
|
||||
}
|
||||
|
||||
int
|
||||
outputs_priority(struct output_device *device)
|
||||
{
|
||||
|
@ -238,9 +238,6 @@ struct output_definition
|
||||
// Write stream data to the output devices
|
||||
void (*write)(struct output_buffer *buffer);
|
||||
|
||||
// Authorize an output with a pin-code (probably coming from the filescanner)
|
||||
void (*authorize)(const char *pin);
|
||||
|
||||
// Called from worker thread for async preparation of metadata (e.g. getting
|
||||
// artwork, which might involce downloading image data). The prepared data is
|
||||
// saved to metadata->data, which metadata_send() can use.
|
||||
@ -358,9 +355,6 @@ outputs_metadata_send(uint32_t item_id, bool startup, output_metadata_finalize_c
|
||||
void
|
||||
outputs_metadata_purge(void);
|
||||
|
||||
void
|
||||
outputs_authorize(enum output_types type, const char *pin);
|
||||
|
||||
int
|
||||
outputs_priority(struct output_device *device);
|
||||
|
||||
|
@ -4382,26 +4382,6 @@ raop_verification_setup(struct raop_session *rs, const char *pin)
|
||||
return -1;
|
||||
}
|
||||
|
||||
static void
|
||||
raop_authorize(const char *pin)
|
||||
{
|
||||
struct raop_session *rs;
|
||||
|
||||
for (rs = raop_sessions; rs; rs = rs->next)
|
||||
{
|
||||
if (rs->state == RAOP_STATE_UNVERIFIED)
|
||||
break;
|
||||
}
|
||||
|
||||
if (!rs)
|
||||
{
|
||||
DPRINTF(E_LOG, L_RAOP, "Got a PIN for device verification, but no device is awaiting verification\n");
|
||||
return;
|
||||
}
|
||||
|
||||
raop_verification_setup(rs, pin);
|
||||
}
|
||||
|
||||
static int
|
||||
raop_device_authorize(struct output_device *device, const char *pin, int callback_id)
|
||||
{
|
||||
@ -5046,6 +5026,5 @@ struct output_definition output_raop =
|
||||
.metadata_purge = raop_metadata_purge,
|
||||
#ifdef RAOP_VERIFICATION
|
||||
.device_authorize = raop_device_authorize,
|
||||
.authorize = raop_authorize,
|
||||
#endif
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user