Author: sayer
Date: 2008-04-23 20:00:11 +0200 (Wed, 23 Apr 2008)
New Revision: 908
Modified:
trunk/apps/webconference/Readme.webconference
trunk/apps/webconference/WebConference.cpp
trunk/apps/webconference/WebConference.h
Log:
webconference listRooms function
Modified: trunk/apps/webconference/Readme.webconference
===================================================================
--- trunk/apps/webconference/Readme.webconference 2008-04-23 17:50:16 UTC
(rev 907)
+++ trunk/apps/webconference/Readme.webconference 2008-04-23 18:00:11 UTC
(rev 908)
@@ -96,9 +96,20 @@
int load,
int cpu
----
+getRoomPassword(string master_pwd, string room)
+ int code, string result
+----
+listRooms(string master_pwd)
+ int code, string result
+----
additionally there is feedback functions to save call quality reports
from users: vqRoomFeedback, vqCallFeedback, vqConferenceFeedback.
resetFeedback, flushFeedback can be used to manipulate the feedback files.
-getRoomPassword retrieves the room password with the master password.
+getRoomPassword and listRooms in only available if master password is set
+in webconference.conf
+
+
+
+
Modified: trunk/apps/webconference/WebConference.cpp
===================================================================
--- trunk/apps/webconference/WebConference.cpp 2008-04-23 17:50:16 UTC (rev
907)
+++ trunk/apps/webconference/WebConference.cpp 2008-04-23 18:00:11 UTC (rev
908)
@@ -327,6 +327,10 @@
args.assertArrayFmt("ss");
getRoomPassword(args, ret);
ret.push(getServerInfoString().c_str());
+ } else if(method == "listRooms"){
+ args.assertArrayFmt("s");
+ listRooms(args, ret);
+ ret.push(getServerInfoString().c_str());
} else if(method == "_list"){
ret.push("roomCreate");
ret.push("roomInfo");
@@ -339,6 +343,7 @@
ret.push("vqCallFeedback");
ret.push("vqRoomFeedback");
ret.push("getRoomPassword");
+ ret.push("listRooms");
} else
throw AmDynInvoke::NotImplemented(method);
}
@@ -559,6 +564,30 @@
ret.push(res.c_str());
}
+void WebConferenceFactory::listRooms(const AmArg& args, AmArg& ret) {
+
+ string pwd = args.get(0).asCStr();
+
+ if ((!MasterPassword.length()) ||
+ pwd != MasterPassword) {
+ ret.push(407);
+ ret.push("Wrong Master Password.\n");
+ return;
+ }
+
+ AmArg room_list;
+
+ rooms_mut.lock();
+ for (map<string, ConferenceRoom>::iterator it =
+ rooms.begin(); it != rooms.end(); it++) {
+ room_list.push(it->first.c_str());
+ }
+ rooms_mut.unlock();
+
+ ret.push(200);
+ ret.push(room_list);
+}
+
void WebConferenceFactory::vqRoomFeedback(const AmArg& args, AmArg& ret) {
assertArgCStr(args.get(0));
Modified: trunk/apps/webconference/WebConference.h
===================================================================
--- trunk/apps/webconference/WebConference.h 2008-04-23 17:50:16 UTC (rev
907)
+++ trunk/apps/webconference/WebConference.h 2008-04-23 18:00:11 UTC (rev
908)
@@ -147,6 +147,7 @@
void resetFeedback(const AmArg& args, AmArg& ret);
void flushFeedback(const AmArg& args, AmArg& ret);
void getRoomPassword(const AmArg& args, AmArg& ret);
+ void listRooms(const AmArg& args, AmArg& ret);
};
_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev