Subject: problem about creating a persistent mucroom
hello,Alex!!!
I want you help,this is my code:
string name = this.roomName.Text;
string descri = this.descri.Text;
Jid jid = new Jid(name + "@conference.127.0.0.1");
MucManager muc = new MucManager(this.mainForm.XmppCon);
muc.CreateReservedRoom(jid);// This is working well without user-defined configuration.
muc.GrantOwnershipPrivileges(jid, this.mainForm.XmppCon.MyJID);
muc.JoinRoom(jid, this.mainForm.mySelf.UserName);
muc.RequestConfigurationForm(jid, new IqCB(OnRequestConfiguration));
public void OnRequestConfiguration(object sender, IQ iq, object obj)
{
agsXMPP.protocol.x.muc.iq.owner.OwnerIq oIq = new agsXMPP.protocol.x.muc.iq.owner.OwnerIq();
oIq.Type = IqType.set;
oIq.To = iq.From;
agsXMPP.protocol.x.data.Data data = new agsXMPP.protocol.x.data.Data(XDataFormType.form);
Field f_persistent = new Field(FieldType.Boolean);
f_persistent.Var = "muc#roomconfig_persistentroom";
f_persistent.Value = "1";
Field f_public = new Field(FieldType.Boolean);
f_public.Var = "muc#roomconfig_publicroom";
f_public.Value = "1";
data.AddChild(f_persistent);
data.AddChild(f_public);
oIq.Query.AddChild(data);
this.mainForm.XmppCon.IqGrabber.SendIq(oIq, new IqCB(OnGetFieldsResult), null);
}
public void OnGetFieldsResult(object sender, IQ iq, object data)
{
//
}
I debug it when it is over the type of the iq is 'result',but the database doesnot have the information the mucroom i create.
I use wildfire and sql2000.
sorry about my bad english!
I want you help,this is my code:
string name = this.roomName.Text;
string descri = this.descri.Text;
Jid jid = new Jid(name + "@conference.127.0.0.1");
MucManager muc = new MucManager(this.mainForm.XmppCon);
muc.CreateReservedRoom(jid);// This is working well without user-defined configuration.
muc.GrantOwnershipPrivileges(jid, this.mainForm.XmppCon.MyJID);
muc.JoinRoom(jid, this.mainForm.mySelf.UserName);
muc.RequestConfigurationForm(jid, new IqCB(OnRequestConfiguration));
public void OnRequestConfiguration(object sender, IQ iq, object obj)
{
agsXMPP.protocol.x.muc.iq.owner.OwnerIq oIq = new agsXMPP.protocol.x.muc.iq.owner.OwnerIq();
oIq.Type = IqType.set;
oIq.To = iq.From;
agsXMPP.protocol.x.data.Data data = new agsXMPP.protocol.x.data.Data(XDataFormType.form);
Field f_persistent = new Field(FieldType.Boolean);
f_persistent.Var = "muc#roomconfig_persistentroom";
f_persistent.Value = "1";
Field f_public = new Field(FieldType.Boolean);
f_public.Var = "muc#roomconfig_publicroom";
f_public.Value = "1";
data.AddChild(f_persistent);
data.AddChild(f_public);
oIq.Query.AddChild(data);
this.mainForm.XmppCon.IqGrabber.SendIq(oIq, new IqCB(OnGetFieldsResult), null);
}
public void OnGetFieldsResult(object sender, IQ iq, object data)
{
//
}
I debug it when it is over the type of the iq is 'result',but the database doesnot have the information the mucroom i create.
I use wildfire and sql2000.
sorry about my bad english!
huanghucheng
Show profile
Link to this post
