Beispiel #1
0
        public XmppData.Data GetResultForm()
        {
            XmppData.Data data = new XmppData.Data(XmppData.XDataFormType.result);

            data.AddChild(new XmppData.Field(XmppData.FieldType.Hidden)
            {
                Var = "FORM_TYPE", FieldValue = Features.FEAT_MUC_ROOMINFO
            });
            data.AddChild(new XmppData.Field()
            {
                Var = "muc#roominfo_description", Label = RoomTitle, FieldValue = Title
            });
            data.AddChild(new XmppData.Field()
            {
                Var = "muc#roomconfig_publicroom", FieldValue = Visible ? "1" : "0", Label = RoomPublic
            });
            data.AddChild(new XmppData.Field()
            {
                Var = "muc#roomconfig_passwordprotectedroom", FieldValue = PasswordProtected ? "1" : "0", Label = RoomPasswordProtected
            });
            data.AddChild(new XmppData.Field()
            {
                Var = "muc#roomconfig_persistentroom", FieldValue = Persistent ? "1" : "0", Label = MakeRoomPersistent
            });
            //data.AddChild(new Field() { Var = "muc#roominfo_subject", FieldValue = Subject, Label = "Real user names only" });
            //data.AddChild(new Field() { Var = "muc#roomconfig_enablelogging", FieldValue = Logging ? "1" : "0", Label = "Logging enabled" });
            return(data);
        }
Beispiel #2
0
        public XmppData.Data GetDataForm(Jid creator)
        {
            XmppData.Data data = new XmppData.Data(XmppData.XDataFormType.form);
            data.Title        = string.Format("Configuration of {0} room", Room.Jid);
            data.Instructions = string.Format("Room {0} was created. Please fill configuration", Room.Name);

            data.AddChild(new XmppData.Field(XmppData.FieldType.Hidden)
            {
                Var = "FORM_TYPE", FieldValue = Features.FEAT_MUC_ROOMCONFIG
            });
            data.AddChild(new XmppData.Field(XmppData.FieldType.Text_Single)
            {
                Var = "muc#roomconfig_roomtitle", Label = RoomTitle, FieldValue = Title
            });
            data.AddChild(new XmppData.Field(XmppData.FieldType.Boolean)
            {
                Var = "muc#roomconfig_publicroom", FieldValue = Visible ? "1" : "0", Label = RoomPublic
            });
            data.AddChild(new XmppData.Field(XmppData.FieldType.Boolean)
            {
                Var = "muc#roomconfig_passwordprotectedroom", FieldValue = PasswordProtected ? "1" : "0", Label = RoomPasswordProtected
            });
            data.AddChild(new XmppData.Field(XmppData.FieldType.Text_Private)
            {
                Var = "muc#roomconfig_roomsecret", Label = RoomPassword, FieldValue = Password
            });
            data.AddChild(new XmppData.Field(XmppData.FieldType.Boolean)
            {
                Var = "muc#roomconfig_changesubject", FieldValue = CanChangeSubject ? "1" : "0", Label = AllowChangeSubject
            });
            data.AddChild(new XmppData.Field(XmppData.FieldType.Boolean)
            {
                Var = "muc#roomconfig_enablelogging", FieldValue = Logging ? "1" : "0", Label = "Enable Public Logging?"
            });
            data.AddChild(new XmppData.Field(XmppData.FieldType.Boolean)
            {
                Var = "muc#roomconfig_persistentroom", FieldValue = Persistent ? "1" : "0", Label = MakeRoomPersistent
            });
            //data.AddChild(new Field(FieldType.Boolean) { Var = "muc#roomconfig_usernamesonly", FieldValue = UserNamesOnly ? "1" : "0", Label = "Allow only real User Names?" });
            return(data);
        }
        public Data GetResultForm()
        {
            Data data = new Data(XDataFormType.result);

            data.AddChild(new Field(FieldType.Hidden) { Var = "FORM_TYPE", FieldValue = Features.FEAT_MUC_ROOMINFO });
            data.AddChild(new Field() { Var = "muc#roominfo_description", Label = RoomTitle, FieldValue = Title });
            data.AddChild(new Field() { Var = "muc#roomconfig_publicroom", FieldValue = Visible ? "1" : "0", Label = RoomPublic });
            data.AddChild(new Field() { Var = "muc#roomconfig_passwordprotectedroom", FieldValue = PasswordProtected ? "1" : "0", Label = RoomPasswordProtected });
            data.AddChild(new Field() { Var = "muc#roomconfig_persistentroom", FieldValue = Persistent ? "1" : "0", Label = MakeRoomPersistent });
            //data.AddChild(new Field() { Var = "muc#roominfo_subject", FieldValue = Subject, Label = "Real user names only" });
            //data.AddChild(new Field() { Var = "muc#roomconfig_enablelogging", FieldValue = Logging ? "1" : "0", Label = "Logging enabled" });
            return data;
        }
        public Data GetDataForm(Jid creator)
        {
            Data data = new Data(XDataFormType.form);
            data.Title = string.Format("Configuration of {0} room", Room.Jid);
            data.Instructions = string.Format("Room {0} was created. Please fill configuration", Room.Name);

            data.AddChild(new Field(FieldType.Hidden) { Var = "FORM_TYPE", FieldValue = Features.FEAT_MUC_ROOMCONFIG });
            data.AddChild(new Field(FieldType.Text_Single) { Var = "muc#roomconfig_roomtitle", Label = RoomTitle, FieldValue = Title });
            data.AddChild(new Field(FieldType.Boolean) { Var = "muc#roomconfig_publicroom", FieldValue = Visible ? "1" : "0", Label = RoomPublic });
            data.AddChild(new Field(FieldType.Boolean) { Var = "muc#roomconfig_passwordprotectedroom", FieldValue = PasswordProtected ? "1" : "0", Label = RoomPasswordProtected });
            data.AddChild(new Field(FieldType.Text_Private) { Var = "muc#roomconfig_roomsecret", Label = RoomPassword, FieldValue = Password });
            data.AddChild(new Field(FieldType.Boolean) { Var = "muc#roomconfig_changesubject", FieldValue = CanChangeSubject ? "1" : "0", Label = AllowChangeSubject });
            data.AddChild(new Field(FieldType.Boolean) { Var = "muc#roomconfig_enablelogging", FieldValue = Logging ? "1" : "0", Label = "Enable Public Logging?" });
            data.AddChild(new Field(FieldType.Boolean) { Var = "muc#roomconfig_persistentroom", FieldValue = Persistent ? "1" : "0", Label = MakeRoomPersistent });
            //data.AddChild(new Field(FieldType.Boolean) { Var = "muc#roomconfig_usernamesonly", FieldValue = UserNamesOnly ? "1" : "0", Label = "Allow only real User Names?" });
            return data;
        }