Skip to content

Commit

Permalink
Handle ClientLoggedOff
Browse files Browse the repository at this point in the history
  • Loading branch information
seishun committed Aug 24, 2013
1 parent 42c2283 commit 315a739
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
13 changes: 13 additions & 0 deletions handlers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,19 @@ void SteamClient::HandleMessage(EMsg emsg, const unsigned char* data, std::size_

break;

case EMsg::ClientLoggedOff:
{
if (!onLogOff) {
return;
}

CMsgClientLoggedOff logged_off;
logged_off.ParseFromArray(data, length);
onLogOff(static_cast<EResult>(logged_off.eresult()));
}

break;

case EMsg::ClientUpdateMachineAuth:
{
if (!onSentry) {
Expand Down
2 changes: 2 additions & 0 deletions steam++.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@ namespace Steam {
*/
std::function<void(EResult result, SteamID steamID)> onLogOn;

std::function<void(EResult result)> onLogOff;

std::function<void(const unsigned char hash[20])> onSentry;

/**
Expand Down

0 comments on commit 315a739

Please sign in to comment.