socketref,再见!高德

https://github.com/adoggie

  C++博客 :: 首页 :: 联系 :: 聚合  :: 管理
  246 Posts :: 4 Stories :: 312 Comments :: 0 Trackbacks

常用链接

留言簿(54)

我参与的团队

搜索

  •  

最新评论

阅读排行榜

评论排行榜

多样的文本消息
-----------------
struct MimeText_t{
     int type;
     string text;
};
MimeText_t 可以包含普通的文本、图像和音频文件的id 
图像和音频数据发送到服务器,服务器并不直接将数据发送到接收者,而是发送 音频和图像的描述uri信息 
接收者解释json,显示text文本,读取emoticon编号,显示表情图片;  image,audio则显示占位(如果当前wifi可用,则自己自动加载image和audio资源) ,如果非wifi信号则待用户点击此占位,然后从服务器请求image和audio资源到本地。
文本描述: 字体大小,颜色,文本link,表情符号 
文本用json组织 ,
{
  set:[
     text:{text:'this is',bg-color:#ff0000,color:#ffffff,font-name:'arial',font-size:20,bold:true,italic:true},
     text:{text:'shanghai',color:#ff0000,font-name:'arial',font-size:20,bold:true,italic:true,link:'http://sw2us.com/images/shanghai.png'},
     image:{id:1001,width:200,height:200,uri:'http://sw2us.com/images/bear.png'},
     audio:{id:2001,duration:5,uri:'http://sw2us.com/clips/a001.mp3'},
     location:{lon:121.221,lat,time,speed,direction,text:'立月路2001号浦星公路口'},
     emoticon:{id:201}
  ],
}
属性名简化: 
---------------------
-----------------------
1 - text               [ 1: text , 2: bg-color , 3: color , 4: font-name, 5:font-size, 6:bold, 7:italic ]
2 - image            [ 1: id , 2:width , 3:height , 4:uri]
3 - audio             [ 1:id , 2:duration,3:uri]
4 - location          [ 1:lon, 2:lat, 3:time, 4:speed, 5:direction, 6:text]
5 - emoticon        [ 1: id ]
-----------------------
0 - false
1 - true 
posted on 2013-11-30 00:34 放屁阿狗 阅读(692) 评论(0)  编辑 收藏 引用 所属分类: IM 系统

只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理