How to determine device orientation in cocos2d-x 2.xx ?

Hi.

In previous versions of engine there was function CCDirector::sharedDirector()->getDeviceOrientation();
How determine device orientation at run time in cocos2d-x 2.xx

Thanks.