예제 #1
0
        /** {@inheritDoc} */
        public override void onHttpStatusOK(QQHttpResponse response)
        {
            JSONObject json = new JSONObject(response.getResponseString());

            if (json.getInt("retcode") == 0)
            {
                JSONObject result = json.getJSONObject("result");
                QQLevel    level  = user.getLevel();
                level.setLevel(result.getInt("level"));
                level.setDays(result.getInt("days"));
                level.setHours(result.getInt("hours"));
                level.setRemainDays(result.getInt("remainDays"));
                notifyActionEvent(QQActionEvent.Type.EVT_OK, user);
            }
            else
            {
                notifyActionEvent(QQActionEvent.Type.EVT_ERROR,
                                  new QQException(QQWpfApplication1.action.QQException.QQErrorCode.UNEXPECTED_RESPONSE, response.getResponseString()));
            }
        }