    001    /**
    002     * Copyright (C) 2010, Skype Limited
    003     *
    004     * All intellectual property rights, including but not limited to copyrights,
    005     * trademarks and patents, as well as know how and trade secrets contained in,
    006     * relating to, or arising from the internet telephony software of
    007     * Skype Limited (including its affiliates, "Skype"), including without
    008     * limitation this source code, Skype API and related material of such
    009     * software proprietary to Skype and/or its licensors ("IP Rights") are and
    010     * shall remain the exclusive property of Skype and/or its licensors.
    011     * The recipient hereby acknowledges and agrees that any unauthorized use of
    012     * the IP Rights is a violation of intellectual property laws.
    013     *
    014     * Skype reserves all rights and may take legal action against infringers of
    015     * IP Rights.
    016     *
    017     * The recipient agrees not to remove, obscure, make illegible or alter any
    018     * notices or indications of the IP Rights and/or Skype's rights and
    019     * ownership thereof.
    020     */
    021
    022    package com.skype.ipc;
    023
    024    import java.io.IOException;
    025
    026    public class XCallRequest extends Request {
    027      private static int requestId = 0;
    028
    029      private int rid;
    030      private int moduleId;
    031      private int methodId;
    032
    033      public XCallRequest(int moduleId, int methodId) throws IOException {
    034        super();
    035        this.moduleId = moduleId;
    036        this.methodId = methodId;
    037        this.oid = 0;
    038        tokens.write('R');
    039        rid = requestId;
    040        requestId += 1;
    041    //    encodeVaruint(rid); // CAUTION: THIS ORDER SEEMS TO HAVE BEEN CHANGED.
    042        encodeVaruint(moduleId);
    043        encodeVaruint(methodId);
    044        encodeVaruint(rid);
    045      }
    046
    047      public int getRid() {
    048        return rid;
    049      }
    050
    051      public int getModuleId() {
    052        return moduleId;
    053      }
    054
    055      public int getMethodId() {
    056        return methodId;
    057      }
    058
    059      public int getOid() {
    060        return oid;
    061      }
    062
    063    }
    064
    065