MCPcopy Create free account
hub / github.com/TDesktop-x64/tdesktop / getState

Method getState

Telegram/SourceFiles/mtproto/session.cpp:397–416  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

395}
396
397int32 Session::getState() const {
398 int32 result = -86400000;
399
400 if (_private) {
401 const auto s = _private->getState();
402 if (s == ConnectedState
403 || s == ConnectingState
404 || s == DisconnectedState) {
405 return s;
406 } else if (s < 0) {
407 if (result < 0 && s > result) {
408 result = s;
409 }
410 }
411 }
412 if (result == -86400000) {
413 result = DisconnectedState;
414 }
415 return result;
416}
417
418QString Session::transport() const {
419 return _private ? _private->transport() : QString();

Callers 8

MainWidgetMethod · 0.45
playerHeightUpdatedMethod · 0.45
updateSelectedMethod · 0.45
handleClickMethod · 0.45
SymbolHitBoundsFunction · 0.45
SymbolRangeHitBoundsFunction · 0.45
dcstateMethod · 0.45
requestStateMethod · 0.45

Calls

no outgoing calls

Tested by 2

SymbolHitBoundsFunction · 0.36
SymbolRangeHitBoundsFunction · 0.36