-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Backport changes from 1.2.x build to 1.1.3 build
- Loading branch information
Showing
8 changed files
with
86 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
using MPTvClient; | ||
|
||
namespace TVServerXBMC.Commands | ||
{ | ||
class GetSignalQuality : CommandHandler | ||
{ | ||
public GetSignalQuality(ConnectionHandler connection) | ||
: base(connection) | ||
{ | ||
|
||
} | ||
|
||
public override void handleCommand(string command, string[] arguments, ref TvControl.User me) | ||
{ | ||
int cardID = -1; | ||
List<string> results = new List<string>(); | ||
|
||
try | ||
{ | ||
if (arguments != null) | ||
{ | ||
cardID = Int32.Parse(arguments[0]); | ||
} | ||
else | ||
{ | ||
cardID = me.CardId; | ||
} | ||
|
||
TVServerController server = TVServerConnection.GetServerInterface(); | ||
int level = server.GetSignalLevel(cardID); | ||
int quality = server.GetSignalQuality(cardID); | ||
|
||
writer.write(level.ToString() + "|" + quality.ToString()); | ||
} | ||
catch | ||
{ | ||
Console.WriteLine(getCommandToHandle() + ": failed"); | ||
writer.write(""); | ||
} | ||
//getConnection().WriteLine("[ERROR]: Expected format: " + getCommandToHandle() + "[:cardID]"); | ||
} | ||
|
||
public override string getCommandToHandle() | ||
{ | ||
return "GetSignalQuality"; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters