Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
bc66dc45
Commit
bc66dc45
authored
Jan 15, 2013
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server_socket: convert to C++
parent
70879356
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
160 additions
and
155 deletions
+160
-155
Makefile.am
Makefile.am
+2
-3
Listen.cxx
src/Listen.cxx
+1
-4
ServerSocket.cxx
src/ServerSocket.cxx
+145
-135
ServerSocket.hxx
src/ServerSocket.hxx
+3
-12
HttpdOutputPlugin.cxx
src/output/HttpdOutputPlugin.cxx
+1
-1
socket_util.h
src/socket_util.h
+8
-0
No files found.
Makefile.am
View file @
bc66dc45
...
...
@@ -88,7 +88,6 @@ mpd_headers = \
src/despotify_utils.h
\
src/text_input_stream.h
\
src/icy_server.h
\
src/server_socket.h
\
src/ls.h
\
src/mixer_api.h
\
src/mixer_control.h
\
...
...
@@ -233,7 +232,7 @@ src_mpd_SOURCES = \
src/ClientMessage.cxx src/ClientMessage.hxx
\
src/ClientSubscribe.cxx src/ClientSubscribe.hxx
\
src/ClientFile.cxx src/ClientFile.hxx
\
src/
server_socket.c
\
src/
ServerSocket.cxx src/ServerSocket.hxx
\
src/Listen.cxx src/Listen.hxx
\
src/Log.cxx src/Log.hxx
\
src/ls.cxx
\
...
...
@@ -1301,7 +1300,7 @@ test_run_output_SOURCES = test/run_output.cxx \
src/AudioCompress/compress.c
\
src/ReplayGainInfo.cxx
\
src/fd_util.c
\
src/
server_socket.c
src/
ServerSocket.cxx
test_read_mixer_LDADD
=
\
libpcm.a
\
...
...
src/Listen.cxx
View file @
bc66dc45
...
...
@@ -22,10 +22,7 @@
#include "Main.hxx"
#include "Client.hxx"
#include "conf.h"
extern
"C"
{
#include "server_socket.h"
}
#include "ServerSocket.hxx"
#include <string.h>
#include <assert.h>
...
...
src/
server_socket.c
→
src/
ServerSocket.cxx
View file @
bc66dc45
This diff is collapsed.
Click to expand it.
src/
server_socket.h
→
src/
ServerSocket.hxx
View file @
bc66dc45
/*
* Copyright (C) 2003-201
1
The Music Player Daemon Project
* Copyright (C) 2003-201
3
The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
...
...
@@ -17,12 +17,11 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef MPD_SERVER_SOCKET_H
#define MPD_SERVER_SOCKET_H
#ifndef MPD_SERVER_SOCKET_H
XX
#define MPD_SERVER_SOCKET_H
XX
#include "gerror.h"
#include <stdbool.h>
#include <stddef.h>
struct
sockaddr
;
...
...
@@ -32,10 +31,6 @@ typedef void (*server_socket_callback_t)(int fd,
size_t
address_length
,
int
uid
,
void
*
ctx
);
#ifdef __cplusplus
extern
"C"
{
#endif
struct
server_socket
*
server_socket_new
(
server_socket_callback_t
callback
,
void
*
callback_ctx
);
...
...
@@ -94,8 +89,4 @@ bool
server_socket_add_path
(
struct
server_socket
*
ss
,
const
char
*
path
,
GError
**
error_r
);
#ifdef __cplusplus
}
#endif
#endif
src/output/HttpdOutputPlugin.cxx
View file @
bc66dc45
...
...
@@ -28,7 +28,7 @@
#include "page.h"
#include "icy_server.h"
#include "fd_util.h"
#include "
server_socket.h
"
#include "
ServerSocket.hxx
"
#include <assert.h>
...
...
src/socket_util.h
View file @
bc66dc45
...
...
@@ -32,6 +32,10 @@
struct
sockaddr
;
#ifdef __cplusplus
extern
"C"
{
#endif
/**
* Creates a socket listening on the specified address. This is a
* shortcut for socket(), bind() and listen().
...
...
@@ -55,4 +59,8 @@ socket_bind_listen(int domain, int type, int protocol,
int
socket_keepalive
(
int
fd
);
#ifdef __cplusplus
}
#endif
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment