2007/09/27

[Programming] libjingle

由於 class.jabber.php 有些問題不明確,所以興起了改用 libjingle 的想法。只是沒想到官網上的 tarball 也有些已知問題沒有解決。幸好在討論區裡面有一位 Brad 把問題說了個大概
簡單的說就是 patch 一下就好:
Index: talk/base/stringutils.h
===================================================================
--- talk/base/stringutils.h (revision 7)
+++ talk/base/stringutils.h (working copy)
@@ -269,7 +269,8 @@
template<>
struct Traits {
typedef std::string string;
- inline static const char* Traits::empty_str() { return ""; }
+ // inline static const char* Traits::empty_str() { return ""; }
+ inline static const char* empty_str() { return ""; }
};

///////////////////////////////////////////////////////////////////////////////
Index: talk/base/base64.h
===================================================================
--- talk/base/base64.h (revision 7)
+++ talk/base/base64.h (working copy)
@@ -23,8 +23,8 @@
static std::string decode(const std::string & data);
static std::string encodeFromArray(const char * data, size_t len);
private:
- static const std::string Base64::Base64Table;
- static const std::string::size_type Base64::DecodeTable[];
+ static const std::string Base64Table;
+ static const std::string::size_type DecodeTable[];
};

} // namespace talk_base
Index: talk/base/unixfilesystem.cc
===================================================================
--- talk/base/unixfilesystem.cc (revision 7)
+++ talk/base/unixfilesystem.cc (working copy)
@@ -111,6 +111,7 @@
if (create)
CreateFolder(pathname);
}
+ return true;
}

std::string UnixFilesystem::TempFilenameI(const Pathname &dir, const std::string &prefix) {
Index: talk/xmpp/xmppclient.h
===================================================================
--- talk/xmpp/xmppclient.h (revision 7)
+++ talk/xmpp/xmppclient.h (working copy)
@@ -138,7 +138,7 @@
}
}

- std::string XmppClient::GetStateName(int state) const {
+ std::string GetStateName(int state) const {
switch (state) {
case STATE_PRE_XMPP_LOGIN: return "PRE_XMPP_LOGIN";
case STATE_START_XMPP_LOGIN: return "START_XMPP_LOGIN";
Index: talk/p2p/base/sessionmanager.h
===================================================================
--- talk/p2p/base/sessionmanager.h (revision 7)
+++ talk/p2p/base/sessionmanager.h (working copy)
@@ -156,7 +156,7 @@

// Creates and returns an error message from the given components. The
// caller is responsible for deleting this.
- buzz::XmlElement* SessionManager::CreateErrorMessage(
+ buzz::XmlElement* CreateErrorMessage(
const buzz::XmlElement* stanza,
const buzz::QName& name,
const std::string& type,


晚點 compile 沒問題的話,再來實做 libjingle 的可能性。

// 再註: libortp 要用 0.7.1 的版本才行。
// 只能用這個版本的。

沒有留言:

[Windows] git-bash 底下的工具

因為工作轉到 Windows 平台上的關係,所以很多工具改到 Windows 上面運作,跟著在 TortoiseGit 底下使用 git-bash 來維護自己的專案原始碼。結果就是裝了前面提過的 auto-hotkey 使用熱鍵來提昇自己的平台操作速度; 但除了 hotkey...