[prev in list] [next in list] [prev in thread] [next in thread] 

List:       helix-server-cvs
Subject:    [Server-cvs] include hxvhost.h,NONE,1.1.2.1
From:       yijil () helixcommunity ! org
Date:       2013-03-29 7:38:52
[Download RAW message or body]

Update of /cvsroot/server/include
In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv11063

Added Files:
      Tag: SERVER_VHOST_YIJI_2
	hxvhost.h 
Log Message:
Committed to: SERVER_VHOST_YIJI_2

Reviewed By: Xiaocheng

Synopsis
========
Vhost plugin for vhost support

Branches: SERVER_VHOST_YIJI_2

Reviewer: Anyone

Description
===========
Vhost Plugin is used for check whether a vhost account exists for a request including \
output and ingest. Define a new interface IHXVhostInformation for users.

DECLARE_INTERFACE_( IHXVhostInformation, IUnknown) {
    STDMETHOD(QueryInterface)   (THIS_
                                REFIID riid,
                                void** ppvObj) PURE;

    STDMETHOD_(ULONG32,AddRef)  (THIS) PURE;

    STDMETHOD_(ULONG32,Release) (THIS) PURE;

    STDMETHOD(GetVhostInfo)     (THIS_
                                IHXRequest* pRequest,
                                REF(IHXValues*) pValues) PURE; };

When server starts, the plugin information will be add to PluginHandler.
If other modules which needs to use this plugin, it will add code like:
    PluginHandler::Plugin* pPlugin = \
pClient->m_pProc->pc->plugin_handler->m_pVhostPlugin;  IUnknown* pUnknown = NULL;
    pPlugin->GetInstance(&pUnknown);
    if (pUnknown)
    {
        IHXPlugin* pPluginInterface = NULL;
        if (HXR_OK == pUnknown->QueryInterface(IID_IHXPlugin, (void**) \
&pPluginInterface) && pPluginInterface)  {
            pPluginInterface->InitPlugin(pClient->m_pProc->pc->server_context);
            IHXVhostInformation* pVhostInterface = NULL;
            IHXValues* pVhostInfo = NULL;
            if (HXR_OK == pUnknown->QueryInterface(IID_IHXVhostInformation, (void**) \
&pVhostInterface) && pVhostInterface)  {
                if (HXR_OK == pVhostInterface->GetVhostInfo(m_pRequest, pVhostInfo) \
&& pVhostInfo)  {
                    IHXRequest2* pRequest = NULL;
                    if (m_pRequest &&
                        HXR_OK == m_pRequest->QueryInterface(IID_IHXRequest2, \
(void**)&pRequest) && pRequest)  {
                        pRequest->SetVhostHeaders(pVhostInfo);
                    }
                    HX_RELEASE(pRequest);
                }
                else
                {
                    HX_RELEASE(pPluginInterface);
                    HX_RELEASE(pUnknown);
                    return FALSE;
                }
            }
        }
        HX_RELEASE(pPluginInterface);
    }
    HX_RELEASE(pUnknown);

For RTMP request, it there exist a CNAME, it need to add CNAME information in request \
header of pRequest.

Files Affected
==============
server/include/server_piids.h
server/common/util/plgnhand.cpp
server/common/util/pub/plgnhand.h

new files
===============
server_rn\vhost\vhostplgn\guids.cpp
server_rn\vhost\vhostplgn\Umakefil
server_rn\vhost\vhostplgn\vhostplin.cpp
server_rn\vhost\vhostplgn\vhostplin.ver
server_rn\vhost\vhostplgn\win32.pcf
server_rn\vhost\vhostplgn\pub\vhostplin.h
server\include\hxvhost.h

Testing Performed
=================



--- NEW FILE: hxvhost.h ---
/* ***** BEGIN LICENSE BLOCK *****
 * Source last modified: $Id: hxvhost.h,v 1.1.2.1 2013/03/29 07:38:44 yijil Exp $
 *
 * Portions Copyright (c) 1995-2010 RealNetworks, Inc. All Rights Reserved.
 *
 * The contents of this file, and the files included with this file,
 * are subject to the current version of the RealNetworks Public
 * Source License (the "RPSL") available at
 * http://www.helixcommunity.org/content/rpsl unless you have licensed
 * the file under the current version of the RealNetworks Community
 * Source License (the "RCSL") available at
 * http://www.helixcommunity.org/content/rcsl, in which case the RCSL
 * will apply. You may also obtain the license terms directly from
 * RealNetworks.  You may not use this file except in compliance with
 * the RPSL or, if you have a valid RCSL with RealNetworks applicable
 * to this file, the RCSL.  Please see the applicable RPSL or RCSL for
 * the rights, obligations and limitations governing use of the
 * contents of the file.
 *
 * Alternatively, the contents of this file may be used under the
 * terms of the GNU General Public License Version 2 (the
 * "GPL") in which case the provisions of the GPL are applicable
 * instead of those above. If you wish to allow use of your version of
 * this file only under the terms of the GPL, and not to allow others
 * to use your version of this file under the terms of either the RPSL
 * or RCSL, indicate your decision by deleting the provisions above
 * and replace them with the notice and other provisions required by
 * the GPL. If you do not delete the provisions above, a recipient may
 * use your version of this file under the terms of any one of the
 * RPSL, the RCSL or the GPL.
 *
 * This file is part of the Helix DNA Technology. RealNetworks is the
 * developer of the Original Code and owns the copyrights in the
 * portions it created.
 *
 * This file, and the files included with this file, is distributed
 * and made available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY
 * KIND, EITHER EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS
 * ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES
 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET
 * ENJOYMENT OR NON-INFRINGEMENT.
 *
 * Technology Compatibility Kit Test Suite(s) Location:
 *    http://www.helixcommunity.org/content/tck
 *
 * Contributor(s):
 *
 * ***** END LICENSE BLOCK ***** */
#ifndef _HXVHOST_H_
#define _HXVHOST_H_

typedef _INTERFACE  IHXValues           IHXValues;
typedef _INTERFACE  IHXRequest          IHXRequest;

// {E6E110A0-1591-4d0f-8FCD-F26EE3E70DC6}
DEFINE_GUID(IID_IHXVhostInformation, 
0xe6e110a0, 0x1591, 0x4d0f, 0x8f, 0xcd, 0xf2, 0x6e, 0xe3, 0xe7, 0xd, 0xc6);


#undef INTERFACE
#define INTERFACE IHXVhostInformation

DECLARE_INTERFACE_( IHXVhostInformation, IUnknown)
{
    STDMETHOD(QueryInterface)   (THIS_
                                REFIID riid,
                                void** ppvObj) PURE;

    STDMETHOD_(ULONG32,AddRef)  (THIS) PURE;

    STDMETHOD_(ULONG32,Release) (THIS) PURE;

    STDMETHOD(GetVhostInfo)     (THIS_
                                IHXRequest* pRequest,
                                REF(IHXValues*) pValues) PURE;
};

#endif


_______________________________________________
Server-cvs mailing list
Server-cvs@helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/server-cvs


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic