⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qmremotecontrol.h

📁 可以播放MP3,wma等文件格式的播放器
💻 H
字号:
/*  * qmremotecontrol.h * * $Id: qmremotecontrol.h,v 1.6 2002/03/07 03:44:17 mariuss Exp $ * * Apollo sound player: http://www.apolloplayer.org * Copyright(C) 2000-2002 Apollo Team.  See CREDITS file. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. * * The GNU General Public License is also available online at: * * http://www.gnu.org/copyleft/gpl.html */#ifndef QMREMOTECONTROL_H_INCLUDED#define QMREMOTECONTROL_H_INCLUDED#include "glibtypes.h"#include <qobject.h>class QSocketNotifier;#define XMMS_PROTOCOL_VERSION 1class QmRemoteControl : public QObject{	Q_OBJECTpublic:	QmRemoteControl();	~QmRemoteControl(); 		gboolean setup_ctrlsocket();public slots:    void ctrlsocket_func();private:	void cleanup_ctrlsocket();	void start_ctrlsocket();	void check_ctrlsocket();	int ctrlsocket_get_session_id();	gboolean remote_cmd(gint session, guint32 cmd);	gint apollo_connect_to_session(gint session);	gboolean apollo_remote_is_running(gboolean session);	// must of course be in sync with XMMS (not that they'll break their on protocol)	enum Command {		CMD_GET_VERSION, CMD_PLAYLIST_ADD, CMD_PLAY, CMD_PAUSE, CMD_STOP,		CMD_IS_PLAYING, CMD_IS_PAUSED, CMD_GET_PLAYLIST_POS,		CMD_SET_PLAYLIST_POS, CMD_GET_PLAYLIST_LENGTH, CMD_PLAYLIST_CLEAR,		CMD_GET_OUTPUT_TIME, CMD_JUMP_TO_TIME, CMD_GET_VOLUME,		CMD_SET_VOLUME, CMD_GET_SKIN, CMD_SET_SKIN, CMD_GET_PLAYLIST_FILE,		CMD_GET_PLAYLIST_TITLE, CMD_GET_PLAYLIST_TIME, CMD_GET_INFO,		CMD_GET_EQ_DATA, CMD_SET_EQ_DATA, CMD_PL_WIN_TOGGLE,		CMD_EQ_WIN_TOGGLE, CMD_SHOW_PREFS_BOX, CMD_TOGGLE_AOT,		CMD_SHOW_ABOUT_BOX, CMD_EJECT, CMD_PLAYLIST_PREV, CMD_PLAYLIST_NEXT,		CMD_PING, CMD_GET_BALANCE, CMD_TOGGLE_REPEAT, CMD_TOGGLE_SHUFFLE, CMD_MAIN_WIN_TOGGLE, CMD_PLAYLIST_ADD_URL_STRING,		CMD_IS_EQ_WIN, CMD_IS_PL_WIN, CMD_IS_MAIN_WIN, CMD_PLAYLIST_DELETE,		CMD_IS_REPEAT, CMD_IS_SHUFFLE,		CMD_GET_EQ, CMD_GET_EQ_PREAMP, CMD_GET_EQ_BAND,		CMD_SET_EQ, CMD_SET_EQ_PREAMP, CMD_SET_EQ_BAND,		CMD_QUIT	};	typedef struct	{		guint16 version;		guint16 command;		guint32 data_length;	}	ClientPktHeader;		typedef struct	{		guint16 version;		guint32 data_length;	}	ServerPktHeader;		typedef struct	{		ClientPktHeader hdr;		gpointer data;		gint fd;	}	PacketNode;		void ctrl_write_packet(gint fd, gpointer data, gint length);	void ctrl_write_gint(gint fd, gint val);	void ctrl_write_gfloat(gint fd, gfloat val);	void ctrl_write_gboolean(gint fd, gboolean b);	void ctrl_write_string(gint fd, gchar * string);	void ctrl_ack_packet(PacketNode * pkt);	void remote_send_packet(gint fd, guint32 command, gpointer data, guint32 data_length);	void remote_read_ack(gint fd);	gpointer remote_read_packet(gint fd, ServerPktHeader * pkt_hdr);	char *g_get_tmp_dir();	void print_cmd(guint16 cmd);		gint bitrate;	gint frequency;	gint numchannels;			gint session_id;	gint ctrl_fd;	gchar *socket_name;	gchar *app_name_for_socket;	QSocketNotifier *socketNotifier;};#endif // QMREMOTECONTROL_H_INCLUDED

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -