Exemple #1
0
        public IConnection GetConnection(ConnectionKindsEnum connectionKind, ConnectionTypesEnum connectionType)
        {
            IConnection result = null;

            if (connectionKind == ConnectionKindsEnum.KodiMediaPlayer && connectionType == ConnectionTypesEnum.JsonRpcHttp)
            {
                result = new KodiJsonRpcHttpConnection();
            }

            if (connectionKind == ConnectionKindsEnum.Enigma2WebInterface ||
                (connectionKind == ConnectionKindsEnum.Enigma2WebInterface && connectionType == ConnectionTypesEnum.Http))
            {
                result = new Enigma2WebIfHttpConnection();
            }

            return(result);
        }
        public IConnection GetConnection(ConnectionKindsEnum connectionKind, ConnectionTypesEnum connectionType)
        {
            IConnection result = null;

            if (connectionKind == ConnectionKindsEnum.KodiMediaPlayer && connectionType == ConnectionTypesEnum.JsonRpcHttp)
            {
                result = new KodiJsonRpcHttpConnection();
            }

            if (connectionKind == ConnectionKindsEnum.Enigma2WebInterface ||
                (connectionKind == ConnectionKindsEnum.Enigma2WebInterface && connectionType == ConnectionTypesEnum.Http))
            {
                result = new Enigma2WebIfHttpConnection();
            }

            return result;
        }