gtalk ,XMPP 和 libjingle

来源:互联网 发布:数学辅导软件 编辑:程序博客网 时间:2024/05/16 06:56

 

google libjingle文档

 

http://code.google.com/intl/zh-CN/apis/talk/libjingle/file_share.html

 

》》》》》》》》》》》》》》》》》》》》》》》》》

 

转自 http://kasicass.blog.163.com

gtalk 使用 XMPP 作为通讯协议,并且把自己对这个协议的实现 libjingle 按 BSD-lisence 放出了,实在是太伟大了。libjingle 本身支持高效语音聊天等等冬冬,有空一定要好好研究。

  • XMPP: Extensible Messaging and Presence Protocol; an IETF standard for instant messaging. XMPP was originally called Jabber, and the XMPP enhancement proposals (XEPs) were previously called Jabber Enhancement Protocols (JEPs).
  • Jingle: a family of XMPP extensions that make it possible to initiate and maintain peer-to-peer sessions. Specific Jingle extensions support voice streaming, video streaming, and file-sharing sessions.


http://www.xmpp.org/
http://code.google.com/apis/talk/index.html

libjingle 可以在这里下载:
https://sourceforge.net/projects/libjingle/

libjingle 依赖底层的语音库 Linphone or GIPS Lite,虽然 GIPS Lite 可以免费下载,不过 Linphone 是 open-source 的,还是多研究下 Linphone 再说。
http://www.linphone.org/index.php/eng
http://developer.gipscorp.com/

-------------------------------
2008-04-03

libjingle 中用到了一个 C++ 实现的 sig/slot 机制,不过此 sigslot 并非 boost::signal。细细品味,算是把 sigslot 的基本代码浮光掠影了一番。
http://sigslot.sourceforge.net/

整个 sigslot 的实现很精巧,让不同 class 协同工作,而又不过于耦合。关于 sigslot 的分析,可以参见 buxiu 兄的文字。在 gtalk 板块。
http://www.vtzone.org

-------------------------------
2008-04-03

正想自己写个 demo 看看 libjingle 如何使用,就发现一位德国兄弟已经做好了研究工作,并把结果也发布了。真是好人啊。MyJingle,一个 libjingle 的 simple demo for windows。
http://www.bluehands.de/software/beat/myjingle/

编译 libjingle 也是件需要耐心的事情
1. 需要 expat XML Parser, http://sourceforge.net/projects/expat/
2. if has error: has no netfw.h, download from SDK, or just from
   http://www.codeproject.com/w2k/WinXPSP2Firewall.asp
   上面的地址已经失效,可以从这里获取:
   http://wasm.ru/forum/files/_1142384163__WinXPSP2Firewall_src.zip
   http://wasm.ru/forum/files/_1246234211__WinXPSP2Firewall_demo.zip

>>>>>>MyJingle编译成功,自己的两个 gmail 账号之间可以语音通讯了,Coooooool~~~

-------------------------------
2008-04-04 

libjingle 是一个客户端的实现,如何制作 XMPP(jabber) 的服务端呢?The answer is 'openfire',一个开源的 XMPP server 的实现。
http://www.igniterealtime.org/projects/openfire/

还有一位老大的 blog,有很多 xmpp 的资料,hoho:
http://hi.baidu.com/jabber

-------------------------------
2008-04-22

很久没弄 libjingle 了,一早又在 cloudwu 的 blog 上看到相关的介绍,掏到了两个新的 jabber 相关的项目,mark it。
gloox - gloox is a rock-solid, full-featured Jabber/XMPP client library
http://camaya.net/gloox
tessa - a modular Jabber client
http://code.google.com/p/tessa/

前面说过 OpenFire 是 java-base 的 xmpp server,而对于 cluster 要求比较高的同学,可以尝试下 ejabberd,一个用 erlang 实现的 xmpp server。
http://www.ejabberd.im/

 

 

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

如何成功编译gtalk

 

1.         首先下载libjingle的源代码,在如下地址:https://sourceforge.net/projects/libjingle/,我下载的是libjingle-0[1].4.0版本
2.         然后安装Visual C++ 2005 Express Edition,具体下载地址,google一把,非常多的链接。
3.         安装好Visual C++ 2005 Express Edition后,需要安装platform SDK,在如下地址中下载:http://www.microsoft.com/msdownload/platformsdk/sdkupdate/psdk-full.htm,按照提示说明安装platform SDK。
4.         在sourceforge.net上下载Expat XML Parser ,地址如下:http://sourceforge.net/project/downloading.php?group_id=10127&use_mirror=nchc&filename=expat_win32bin_2_0_0.exe&33064126,我下载的是2.0.0版本,安装完成后,需要到Visual C++ 2005 Express Edition版本中更新选项,Tools-》Options-》Projects and Solutions-》VC++ directories
   Library files: C:/Expat-2.0.0/StaticLibs
   Include files: C:/Expat-2.0.0/Source/Lib
   Include files: C:/Program Files/Microsoft SDK/include
5.         编译工程,仍旧有以下提示:
------ Build started: Project: libjingle, Configuration: Debug Win32 ------
Compiling...
gipslitemediaengine.cc
d:/p2p/xmpp/libjingle/libjingle-0[1].4.0/libjingle-0.4.0/talk/session/phone/gipslitemediaengine.h(33) : fatal error C1083: Cannot open include file: ''talk/third_party/gips/Interface/GipsVoiceEngineLite.h'': No such file or directory
channelmanager.cc
d:/p2p/xmpp/libjingle/libjingle-0[1].4.0/libjingle-0.4.0/talk/session/phone/gipslitemediaengine.h(33) : fatal error C1083: Cannot open include file: ''talk/third_party/gips/Interface/GipsVoiceEngineLite.h'': No such file or directory
winfirewall.cc
d:/p2p/xmpp/libjingle/libjingle-0[1].4.0/libjingle-0.4.0/talk/base/winfirewall.cc(29) : fatal error C1083: Cannot open include file: ''netfw.h'': No such file or directory
Generating Code...
Build log was saved at "file://d:/p2p/xmpp/libjingle/libjingle-0[1].4.0/libjingle-0.4.0/talk/Debug/BuildLog.htm"
libjingle - 3 error(s), 0 warning(s)
6.         前面两个编译错误,可以通过下载GipsVoiceEngineLite包完成,但是现在GipsVoiceEngineLite是需要许可才能下载,由于项目中暂时不需要语音功能,所以在项目中去掉了session/phone子项目,前面两个编译错误消失。
7.         在http://www.codeproject.com/KB/winsdk/WinXPSP2Firewall.aspx中下载WinXPSP2Firewall_demo文件包,将icftypes.h和netfw.h拷贝到/talk/base目录下,在base工程中加入icftypes.h文件。
8.       重新编译,libjingle - 0 error(s), 0 warning(s)
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========大功告成,libjingle编译成功。

原创粉丝点击