| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
Due to a typo, adding local files was always denied.
Disable the second playlist_append_file() invocation on WIN32.
|
| |
|
|
|
|
|
|
| |
There are no unix sockets on WIN32, and therefore no authentication.
WIN32 might have similar capabilities, but until we implement them,
disable that MPD feature.
|
|
|
|
|
| |
Only include headers which are really needed. os_compat.h aimed to
make MPD easily portable, but was never actually made portable.
|
|
|
|
| |
gmtime_r() is not available.
|
|
|
|
|
|
| |
When a client-specified URI has a scheme which is not supported, do
not try to open it as a local file, but provide a meaningful error
message.
|
|
|
|
|
| |
printRemoteUrlHandlers() cannot fail, and does not need a return
value.
|
|
|
|
|
| |
We want to remove gcc.h eventually. This takes care of all the G_GNUC_PRINTF
macros.
|
| |
|
|
|
|
| |
We shouldn't pass strerror() where a format string is expected.
|
|
|
|
|
|
| |
The client may provide the names of idle events as arguments to the
"idle" command to inform MPD that it is only interested in these
events.
|
|
|
|
|
| |
We don't need to sanitize the path, because the mapper already checks
for malformed paths.
|
|
|
|
| |
Replace a custom data structure with a GLib one.
|
|
|
|
| |
check_bool() accepts only "0" or "1". The range check is superfluous.
|
|
|
|
|
| |
Due to a logic error, no value was valid for the boolean value
parser. Replace "||" with "&&".
|
|
|
|
| |
The function deletePlaylist() shouldn't be in playlist.c.
|
|
|
|
|
| |
The "long" result of strtol() was implicitly casted down to a 32 bit
integer. Add some range checking instead.
|
|
|
|
|
|
|
| |
Many command arguments must not be negative; add a separate
parser/checker function for that. For the same reason, add
check_bool(). This eliminates two strange special cases handlers from
check_int().
|
|
|
|
|
|
| |
There are some integers which have a "magic" -1 value which means
"undefined" or "nothing". All others can be converted to unsigned,
since they must not contain a negative number.
|
|
|
|
|
| |
Instead of returning 0 for success and -1 for failure, return true or
false. This seems more natural.
|
|
|
|
|
|
|
|
| |
Also add names for "error" and "ok". I don't like passing anonymous
integer codes around.
This is not yet complete: lots of functions (e.g. in playlist.c)
follow the same convention of -1/0, and these have to be adapted, too.
|
|
|
|
| |
http://xkcd.com/292/
|
|
|
|
| |
Eliminate CamelCase in all public and static functions.
|
|
|
|
|
| |
The typedef CommandHandlerFunction is only used once. Move its type
into the command struct.
|
| |
|
|
|
|
|
| |
Send last modification timestamps to the client. This allows the
client to see when another client modifies a stored playlist.
|
|
|
|
|
| |
"listplaylists" returns a list of all stored playlists. This command
seems more elaborate than listing them below "lsinfo".
|
|
|
|
|
| |
The function print_spl_list() replaces the old function lsPlaylists()
from ls.c.
|
|
|
|
|
| |
Rename addToStoredPlaylist() to spl_append_uri(), and remove the
clearStoredPlaylist() macro.
|
|
|
|
| |
Renamed all public functions, prefix is "spl_".
|
|
|
|
| |
No CamelCase in file names.
|
|
|
|
|
|
| |
The list of commands is known at compile time. Instead of creating a
linked list on startup, we can just register all commands in a static
sorted array.
|
|
|
|
|
|
| |
The command pointers which are passed around aren't being modified -
in fact, no command pointer must be modified once it has been added to
the commandList.
|
|
|
|
| |
No CamelCase and no struct typedefs.
|
|
|
|
| |
client->permission is a bit set, and should be unsigned.
|
|
|
|
|
|
| |
When adding a local file, clients have to use the "file" URI schema
described in RFC 1738 3.10. By adding this schema to "urlhandlers", a
client can detect whether this feature is available.
|
|
|
|
|
| |
The undocumented command "add /" adds the full music database to the
playlist. Don't interpret this special path as a local file path.
|
|
|
|
|
| |
Clients which have authenticated via unix socket may add local files
to the MPD playlist, provided that they own the file.
|
|
|
|
|
|
| |
Returning the playlist_result value from a command handler does not
make sense. Call print_playlist_result() there, and forward its
return value.
|
|
|
|
|
|
| |
"idle" waits until something noteworthy happens on the server,
e.g. song change, playlist modified, database updated. This allows
clients to keep up to date without polling.
|
|
|
|
|
| |
player_get_audio_format() replaces getPlayerSampleRate(),
getPlayerBits(), getPlayerChannels().
|
|
|
|
| |
This replaces the attributes bits, channels, sampleRate.
|
|
|
|
| |
Since the return value cannot be -1 anymore, we can make it unsigned.
|
|
|
|
|
|
|
| |
The documentation for directory_update_init() was incorrect: a job ID
must be positive, not non-negative. If the update queue is full and
no job was created, it makes more sense to return 0 instead of -1,
because it is more consistent with the return value of isUpdatingDB().
|
|
|
|
|
|
| |
Remove clutter from directory.c. Everything which saves or loads
to/from the hard disk goes to directory_save.c, and code which sends
directory information to the client is moved into directory_print.c.
|
|
|
|
|
|
|
| |
With commit 6dcd7fea (if I am not mistaken) the error returned when
you try to save to an existing playlist is wrong. Instead of
MPD_ACK_ERROR_EXIST, MPD_ACK_ERROR_NO_EXIST is returned. This is
obviously wrong and breaks gmpc.
|
|
|
|
| |
Yet another CamelCase removal patch.
|
|
|
|
| |
The same can be achieved with directory_print(db_get_directory()).
|
|
|
|
|
|
| |
Taming the directory.c monster, part II: move the database management
stuff to database. directory.c should only contain code which works
on directory objects.
|
|
|
|
|
|
| |
The source directory.c mixes several libraries: directory object
management, database management and database update, resulting in a
1000+ line monster. Move the whole database update code to update.c.
|