Package net.solosky.maplefetion.sipc

Examples of net.solosky.maplefetion.sipc.SipcRequest.addHeader()


     * 删除定时短信
     */
    public SipcRequest createDeleteScheduleSMSRequest(Collection<ScheduleSMS> scheduleSMSList)
    {
      SipcRequest req = this.createDefaultSipcRequest(SipcMethod.SERVICE);
      req.addHeader(SipcHeader.EVENT, "SSDeleteScheduleSms");
     
      String body = MessageTemplate.TMPL_DELETE_SCHEDULE_SMS;
     
      String scheduleSMSTmpl = "<schedule-sms id=\"{id}\" />";
      StringBuffer buffer = new StringBuffer();
View Full Code Here


     * 将好友移到黑名单中
     */
    public SipcRequest createAddBuddyToBlackList(String uri)
    {
      SipcRequest req = this.createDefaultSipcRequest(SipcMethod.SERVICE);
      req.addHeader(SipcHeader.EVENT, "AddToBlacklist");
      req.setBody(new SipcBody(MessageTemplate.TMPL_ADD_TO_BLACKLIST.replace("{uri}", uri)));
      return req;
    }
   
    /**
 
View Full Code Here

     * 将好友从黑名单移除
     */
    public SipcRequest createRemoveBuddyFromBlackList(int userId)
    {
      SipcRequest req = this.createDefaultSipcRequest(SipcMethod.SERVICE);
      req.addHeader(SipcHeader.EVENT, "RemoveFromBlacklistV4");
      req.setBody(new SipcBody(MessageTemplate.TMPL_REMOVE_FROM_BLACKLIST.replace("{userId}", Integer.toString(userId))));
      return req;
    }
    ///////////////////////////////////////收据///////////////////////////////////////////////
   
View Full Code Here

   * @return
   */
    public SipcRequest createDefaultSipcRequest(String m)
    {
      SipcRequest req = new SipcRequest(m,this.user.getDomain());
      req.addHeader(SipcHeader.FROM, Integer.toString(this.user.getFetionId()));
      if(m.equals(this.lastMethod)) {
        req.addHeader(SipcHeader.CALLID,   Integer.toString(this.globalCallId));
        req.addHeader(SipcHeader.SEQUENCE, Integer.toString(this.getNextSequence())+" "+m);
      }else {
        req.addHeader(SipcHeader.CALLID,   Integer.toString(this.getNextCallID()));
View Full Code Here

    public SipcRequest createDefaultSipcRequest(String m)
    {
      SipcRequest req = new SipcRequest(m,this.user.getDomain());
      req.addHeader(SipcHeader.FROM, Integer.toString(this.user.getFetionId()));
      if(m.equals(this.lastMethod)) {
        req.addHeader(SipcHeader.CALLID,   Integer.toString(this.globalCallId));
        req.addHeader(SipcHeader.SEQUENCE, Integer.toString(this.getNextSequence())+" "+m);
      }else {
        req.addHeader(SipcHeader.CALLID,   Integer.toString(this.getNextCallID()));
        req.addHeader(SipcHeader.SEQUENCE, "1 "+m);
        this.gloalSequence = 1;
View Full Code Here

    {
      SipcRequest req = new SipcRequest(m,this.user.getDomain());
      req.addHeader(SipcHeader.FROM, Integer.toString(this.user.getFetionId()));
      if(m.equals(this.lastMethod)) {
        req.addHeader(SipcHeader.CALLID,   Integer.toString(this.globalCallId));
        req.addHeader(SipcHeader.SEQUENCE, Integer.toString(this.getNextSequence())+" "+m);
      }else {
        req.addHeader(SipcHeader.CALLID,   Integer.toString(this.getNextCallID()));
        req.addHeader(SipcHeader.SEQUENCE, "1 "+m);
        this.gloalSequence = 1;
      }
View Full Code Here

      req.addHeader(SipcHeader.FROM, Integer.toString(this.user.getFetionId()));
      if(m.equals(this.lastMethod)) {
        req.addHeader(SipcHeader.CALLID,   Integer.toString(this.globalCallId));
        req.addHeader(SipcHeader.SEQUENCE, Integer.toString(this.getNextSequence())+" "+m);
      }else {
        req.addHeader(SipcHeader.CALLID,   Integer.toString(this.getNextCallID()));
        req.addHeader(SipcHeader.SEQUENCE, "1 "+m);
        this.gloalSequence = 1;
      }
      req.setAliveTime((int) (FetionConfig.getInteger("fetion.sip.default-alive-time")+System.currentTimeMillis()/1000));
      this.lastMethod = m;
View Full Code Here

      if(m.equals(this.lastMethod)) {
        req.addHeader(SipcHeader.CALLID,   Integer.toString(this.globalCallId));
        req.addHeader(SipcHeader.SEQUENCE, Integer.toString(this.getNextSequence())+" "+m);
      }else {
        req.addHeader(SipcHeader.CALLID,   Integer.toString(this.getNextCallID()));
        req.addHeader(SipcHeader.SEQUENCE, "1 "+m);
        this.gloalSequence = 1;
      }
      req.setAliveTime((int) (FetionConfig.getInteger("fetion.sip.default-alive-time")+System.currentTimeMillis()/1000));
      this.lastMethod = m;
      return req;
View Full Code Here

     * @return
     */
    public SipcRequest createServerRegisterRequest(int presence, boolean isSupportedMutiConnection)
    {
       SipcRequest req = this.createDefaultSipcRequest(SipcMethod.REGISTER);
       req.addHeader("CN", AuthGeneratorV4.getCnonce());
         req.addHeader("CL", "type=\"pc\" ,version=\""+FetionClient.PROTOCOL_VERSION+"\"");
         return req;
    }
   
    /**
 
View Full Code Here

     */
    public SipcRequest createServerRegisterRequest(int presence, boolean isSupportedMutiConnection)
    {
       SipcRequest req = this.createDefaultSipcRequest(SipcMethod.REGISTER);
       req.addHeader("CN", AuthGeneratorV4.getCnonce());
         req.addHeader("CL", "type=\"pc\" ,version=\""+FetionClient.PROTOCOL_VERSION+"\"");
         return req;
    }
   
    /**
     * 用户登录验证
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.