Keeps the connection to the MPD server and handels the most basic structure of the MPD protocol. The high level commands are handeled in the Libmpc.Mpc class.
示例#1
0
 public static int ConnectToMPD()
 {
     try
     {
         mpcconn = new MpcConnection(mpdip);
         //mpcconn.Connect();
     }
     catch (Exception e)
     {
         error = e.Message;
         return 1;
     }
     if (mpcconn.Connected)
     {
         serverVersion = mpcconn.Version;
         mpc.Connection = mpcconn;
         return 0;
     }
     return 2;
 }
示例#2
0
文件: Mpc.cs 项目: sakya/wpfmpdclient
 private void OnSubsystemsChangedHandler(MpcConnection connection, Mpc.Subsystems subsystems)
 {
     if (this.OnSubsystemsChanged != null)
     this.OnSubsystemsChanged(this, subsystems);
 }
示例#3
0
文件: Mpc.cs 项目: sakya/wpfmpdclient
 private void onMpcConnectionDisconnected(MpcConnection connection)
 {
     if (this.OnDisconnected != null)
     this.OnDisconnected.Invoke(this);
 }