Package net.solosky.maplefetion.sipc

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


    {
      SipcRequest req = this.createDefaultSipcRequest(SipcMethod.SERVICE);
      String body = MessageTemplate.TMPL_APPLICATION_DECLINED;
      body = body.replace("{userId}", Integer.toString(userId));
     
      req.addHeader(SipcHeader.EVENT,"HandleContactRequestV4");
     
      req.setBody(new SipcBody(body));
      return req;
    }
   
View Full Code Here


        //BeanHelper.toUpdateXML(BuddyExtend.class, this.client.getFetionUser(), builder);
     
      String body = MessageTemplate.TMPL_SET_PERSONAL_INFO;
      body = body.replace("{personal}", builder.toXML("personal"));
     
      req.addHeader(SipcHeader.EVENT,"SetUserInfoV4");
     
      req.setBody(new SipcBody(body));
      return req;
    }
   
View Full Code Here

     
      String body = MessageTemplate.TMPL_SET_BUDDY_LOCAL_NAME;
      body = body.replace("{userId}", Integer.toString(userId));
      body = body.replace("{localName}", localName);
     
      req.addHeader(SipcHeader.EVENT,"SetContactInfoV4");
     
      req.setBody(new SipcBody(body));
      return req;
    }
   
View Full Code Here

     
      String body = MessageTemplate.TMPL_SET_BUDDY_CORD;
      body = body.replace("{userId}", Integer.toString(userId));
      body = body.replace("{cordId}", cordId!=null?cordId:"");
     
      req.addHeader(SipcHeader.EVENT,"SetContactInfoV4");
     
      req.setBody(new SipcBody(body));
      return req;
    }
   
View Full Code Here

     * 建立新的分组
     */
    public SipcRequest createCreateCordRequest(String title)
    {
      SipcRequest req = this.createDefaultSipcRequest(SipcMethod.SERVICE);
      req.addHeader(SipcHeader.EVENT,"CreateBuddyList");
     
      req.setBody(new SipcBody(MessageTemplate.TMPL_CREATE_CORD.replace("{title}", title)) );
      return req;
    }
   
View Full Code Here

     * 删除分组
     */
    public SipcRequest createDeleteCordRequest(int cordId)
    {
      SipcRequest req = this.createDefaultSipcRequest(SipcMethod.SERVICE);
      req.addHeader(SipcHeader.EVENT,"DeleteBuddyList");
     
      req.setBody(new SipcBody(MessageTemplate.TMPL_DELETE_CORD.replace("{cordId}", Integer.toString(cordId))) );
      return req;
    }
   
View Full Code Here

     * 更新分组标题
     */
    public SipcRequest createSetCordTitleRequest(int cordId, String title)
    {
      SipcRequest req = this.createDefaultSipcRequest(SipcMethod.SERVICE);
      req.addHeader(SipcHeader.EVENT,"SetBuddyListInfo");
     
      String body = MessageTemplate.TMPL_UPDATE_CORD;
      body = body.replace("{cordId}", Integer.toString(cordId));
      body = body.replace("{title}", title);
      req.setBody(new SipcBody(body));
View Full Code Here

      SipcRequest req = this.createDefaultSipcRequest(SipcMethod.SERVICE);
     
      String body = MessageTemplate.TMPL_SET_PRESENCE;
      body = body.replace("{presence}", Integer.toString(presence));
     
      req.addHeader(SipcHeader.EVENT,"SetPresenceV4");
     
      req.setBody(new SipcBody(body));
      return req;
    }
    /**
 
View Full Code Here

     */
    public SipcRequest createLogoutRequest(String uri)
    {
      SipcRequest req = this.createDefaultSipcRequest(SipcMethod.BYE);
     
      req.addHeader(SipcHeader.TO, uri);
      return req;
    }
   
    //////////////////////////////////////群操作///////////////////////////////////////////////
    /**
 
View Full Code Here

     * 获取群列表
     */
    public SipcRequest createGetGroupListRequest(int localVersion)
    {
      SipcRequest req = this.createDefaultSipcRequest(SipcMethod.SERVICE);
      req.addHeader(SipcHeader.EVENT, "PGGetGroupList");
     
      req.setBody(new SipcBody(MessageTemplate.TMPL_GET_GROUP_LIST.replace("{version}", Integer.toString(localVersion))));
     
      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.