Skip to content

Commit

Permalink
Merge pull request #71 from UniversityRadioYork/mw-okay-is-ok
Browse files Browse the repository at this point in the history
Rename OKAY response to OK.
  • Loading branch information
wlcx committed Dec 8, 2014
2 parents 4dc8c81 + 01fdc59 commit d2bbb54
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ Announces a state change. The _state_ will be one of:

Announces that _file_ has just been loaded.

### OKAY _command..._
### OK _command..._

Announces that a valid _command_ has just been received and processed.

Expand Down
2 changes: 1 addition & 1 deletion src/cmd_result.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include "cmd_result.hpp"

/* static */ const ResponseCode CommandResult::TYPE_CODES[] = {
ResponseCode::OKAY, // Type::SUCCESS
ResponseCode::OK, // Type::SUCCESS
ResponseCode::WHAT, // Type::INVALID
ResponseCode::FAIL, // Type::FAILURE
};
Expand Down
2 changes: 1 addition & 1 deletion src/cmd_result.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class CommandResult
/**
* Sends a response to a ResponseSink about this CommandResult.
*
* If the CommandResult was a success, then the response is 'OKAY cmd',
* If the CommandResult was a success, then the response is 'OK cmd',
* where 'cmd' is the parameter named as such. Otherwise, the response
* is 'X msg', where 'msg' is the result message and 'X' is whichever
* response code is most appropriate for the failure.
Expand Down
2 changes: 1 addition & 1 deletion src/io/io_response.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include "io_response.hpp"

const std::string ResponseSink::STRINGS[] = {
"OKAY", // ResponseCode::OKAY
"OK", // ResponseCode::OK
"WHAT", // ResponseCode::WHAT
"FAIL", // ResponseCode::FAIL
"OHAI", // ResponseCode::OHAI
Expand Down
2 changes: 1 addition & 1 deletion src/io/io_response.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* @see ResponseSink::STRINGS
*/
enum class ResponseCode : std::uint8_t {
OKAY, ///< Request was valid and produced an answer.
OK, ///< Request was valid and produced an answer.
WHAT, ///< Request was invalid/user error.
FAIL, ///< Error, pointing blame at environment.
OHAI, ///< Server starting up.
Expand Down
2 changes: 1 addition & 1 deletion src/playd.1
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ Sent upon connection;
.Ar ident
identifies the playd server and version number.
.\"
.It OKAY Ar command...
.It OK Ar command...
.Nm
just finished processing
.Ar command .
Expand Down
4 changes: 2 additions & 2 deletions src/tests/cmd_result.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ SCENARIO("CommandResult's convenience constructors create correct CommandResults
WHEN("Emit(cmd) is called") {
c.Emit(d, cmd);

THEN("the response is OKAY followed by the command words") {
REQUIRE(os.str() == "OKAY OHAI 'testy test'\n");
THEN("the response is OK followed by the command words") {
REQUIRE(os.str() == "OK OHAI 'testy test'\n");
}
}
}
Expand Down

0 comments on commit d2bbb54

Please sign in to comment.