예제 #1
0
        public XmppPluginInstance(XmppConfig config, IRobot robot)
        {
            this.config = config;
            this.robot  = robot;

            client = new XmppClientConnection {
                Resource     = config.Resource,
                Server       = config.Server,
                Port         = config.Port,
                Username     = config.Username,
                Password     = config.Password,
                UseSSL       = config.UseSSL,
                UseStartTLS  = config.UseStartTLS,
                KeepAlive    = true,
                AutoPresence = true,
                AutoAgents   = true,
                AutoRoster   = true,
            };

            chatManager = new MucManager(client);

            client.OnAuthError += OnAuthError;
            client.OnError     += OnError;
            client.OnLogin     += OnLogin;
            client.OnPresence  += OnPresence;
            client.OnMessage   += OnMessage;
            client.OnIq        += ClientOnOnIq;

            client.DiscoInfo.AddFeature(new DiscoFeature("urn:xmpp:bob"));
        }
예제 #2
0
 public NodeConfig() {
   EdgeListeners = new EdgeListener[0];
   RemoteTAs = new String[0];
   DevicesToBind = new String[0];
   XmlRpcManager = new Service();
   NCService = new NCServiceConfig();
   Security = new SecurityPolicy();
   PrivateNodeConfig = new PrivateNodeConfig();
   BrunetNamespace = String.Empty;
   XmppServices = new XmppConfig();
 }
예제 #3
0
 public NodeConfig()
 {
     EdgeListeners     = new EdgeListener[0];
     RemoteTAs         = new String[0];
     DevicesToBind     = new String[0];
     XmlRpcManager     = new Service();
     NCService         = new NCServiceConfig();
     Security          = new SecurityPolicy();
     PrivateNodeConfig = new PrivateNodeConfig();
     BrunetNamespace   = String.Empty;
     XmppServices      = new XmppConfig();
 }