streaming: Add set_state and get_state to stream_session()

Note: Origin uses name sate() for the function name. We can not since it
conflicts with the name of enum class stream_session::state.
This commit is contained in:
Asias He
2015-06-24 10:47:28 +08:00
parent 6619122b35
commit 934c17fa6b

View File

@@ -398,27 +398,24 @@ public:
streamResult.handleSessionComplete(this);
}
}
#endif
public:
/**
* Set current state to {@code newState}.
*
* @param newState new state to set
*/
public void state(State newState)
{
state = newState;
void set_state(stream_session::state new_state) {
_state = new_state;
}
/**
* @return current state
*/
public State state()
{
return state;
stream_session::state get_state() {
return _state;
}
#endif
public:
/**
* Return if this session completed successfully.
*