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);
 }