Subject: Creating and configuring a new conference room
Hi,
I am trying to create and configure a new conference room, so it'll be persistant and logged, with max 100 users.
I have tried to use both CreateReservedRoom and JoinRoom, but none worked.
This is my code:
MucManager muc = new MucManager(xmppCnn);
//muc.CreateReservedRoom(roomJid);
muc.JoinRoom(roomJid, "a");
muc.GrantOwnershipPrivileges(roomJid, xmppCnn.MyJID);
Field f_form = new Field(FieldType.Hidden);
f_form.Var = "http://jabber.org/protocol/muc#roomconfig";
f_form.Value = "FORM_TYPE";
Field f_persistent = new Field(FieldType.Boolean);
f_persistent.Var = "muc#roomconfig_persistentroom";
f_persistent.Value = "1";
Field f_log_msgs = new Field(FieldType.Boolean);
f_log_msgs.Var = "roomconfig_enablelogging";
f_log_msgs.Value = "1";
Field f_max_users = new Field(FieldType.List_Single);
f_max_users.Var = "muc#roomconfig_maxusers";
f_max_users.Value = "100";
Data data = new Data(XDataFormType.form);
data.AddField(f_form);
data.AddChild(f_persistent);
data.AddChild(f_log_msgs);
data.AddChild(f_max_users);
agsXMPP.protocol.x.muc.iq.owner.OwnerIq oIq = new agsXMPP.protocol.x.muc.iq.owner.OwnerIq(IqType.set, roomJid);
oIq.Query.AddChild(data);
xmppCnn.Send(oIq);
Also, I have managed to RequestConfigurationForm, but I couldn't edit the query's children nodes (only added another line with diff. value), and submitting it didn't work.
Will appreciate any help,
-Dan
I am trying to create and configure a new conference room, so it'll be persistant and logged, with max 100 users.
I have tried to use both CreateReservedRoom and JoinRoom, but none worked.
This is my code:
MucManager muc = new MucManager(xmppCnn);
//muc.CreateReservedRoom(roomJid);
muc.JoinRoom(roomJid, "a");
muc.GrantOwnershipPrivileges(roomJid, xmppCnn.MyJID);
Field f_form = new Field(FieldType.Hidden);
f_form.Var = "http://jabber.org/protocol/muc#roomconfig";
f_form.Value = "FORM_TYPE";
Field f_persistent = new Field(FieldType.Boolean);
f_persistent.Var = "muc#roomconfig_persistentroom";
f_persistent.Value = "1";
Field f_log_msgs = new Field(FieldType.Boolean);
f_log_msgs.Var = "roomconfig_enablelogging";
f_log_msgs.Value = "1";
Field f_max_users = new Field(FieldType.List_Single);
f_max_users.Var = "muc#roomconfig_maxusers";
f_max_users.Value = "100";
Data data = new Data(XDataFormType.form);
data.AddField(f_form);
data.AddChild(f_persistent);
data.AddChild(f_log_msgs);
data.AddChild(f_max_users);
agsXMPP.protocol.x.muc.iq.owner.OwnerIq oIq = new agsXMPP.protocol.x.muc.iq.owner.OwnerIq(IqType.set, roomJid);
oIq.Query.AddChild(data);
xmppCnn.Send(oIq);
Also, I have managed to RequestConfigurationForm, but I couldn't edit the query's children nodes (only added another line with diff. value), and submitting it didn't work.
Will appreciate any help,
-Dan