Search in sources :

Example 1 with RateClassInfo

use of net.kano.joscar.snaccmd.conn.RateClassInfo in project Openfire by igniterealtime.

the class BasicFlapConnection method handleSnacResponse.

@Override
protected void handleSnacResponse(SnacResponseEvent e) {
    Log.debug("OSCAR snac packet response: " + e);
    SnacCommand cmd = e.getSnacCommand();
    if (cmd instanceof RateInfoCmd) {
        RateInfoCmd ric = (RateInfoCmd) cmd;
        List<RateClassInfo> rateClasses = ric.getRateClassInfos();
        int[] classes = new int[rateClasses.size()];
        for (int i = 0; i < rateClasses.size(); i++) {
            classes[i] = rateClasses.get(i).getRateClass();
        }
        request(new RateAck(classes));
    }
}
Also used : RateInfoCmd(net.kano.joscar.snaccmd.conn.RateInfoCmd) SnacCommand(net.kano.joscar.flapcmd.SnacCommand) RateClassInfo(net.kano.joscar.snaccmd.conn.RateClassInfo) RateAck(net.kano.joscar.snaccmd.conn.RateAck)

Aggregations

SnacCommand (net.kano.joscar.flapcmd.SnacCommand)1 RateAck (net.kano.joscar.snaccmd.conn.RateAck)1 RateClassInfo (net.kano.joscar.snaccmd.conn.RateClassInfo)1 RateInfoCmd (net.kano.joscar.snaccmd.conn.RateInfoCmd)1