(file) Return to wsmanparser.h CVS log (file) (dir) Up to [OMI] / omi / protocol

File: [OMI] / omi / protocol / Attic / wsmanparser.h (download)
Revision: 1.1.1.1 (vendor branch), Wed May 30 21:47:49 2012 UTC (12 years, 1 month ago) by mike
Branch: TOG
CVS Tags: OMI_1_0_2_Branch, OMI_1_0_2, OMI_1_0_1_PRE, OMI_1_0_1, OMI_1_0_0
Changes since 1.1: +0 -0 lines
Initial Import

/*
**==============================================================================
**
** Open Management Infrastructure (OMI)
**
** Copyright (c) Microsoft Corporation
** 
** Licensed under the Apache License, Version 2.0 (the "License"); you may not 
** use this file except in compliance with the License. You may obtain a copy 
** of the License at 
**
**     http://www.apache.org/licenses/LICENSE-2.0 
**
** THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
** KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED 
** WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, 
** MERCHANTABLITY OR NON-INFRINGEMENT. 
**
** See the Apache 2 License for the specific language governing permissions 
** and limitations under the License.
**
**==============================================================================
*/

#ifndef _omi_wsmanparser_h
#define _omi_wsmanparser_h

#include "config.h"
#include <string.h>
#include <common.h>
#include <xml/xml.h>
#include <base/instance.h>

BEGIN_EXTERNC

/* wsman header struct */
typedef struct _WSMAN_WSHeader
{
    /* True if an <s:Action> element was found */
    MI_Boolean foundAction;

    /* Attributes of the request */
    int rqtAction;
    MI_Uint32 maxEnvelopeSize;
    const char* rqtClassname;
    const char* rqtNamespace;
    const char* rqtMessageID;
    const char* unknownMandatoryTag;

    /* instance that holds keys of operation (invoke/get/delete etc) */
    MI_Instance* instance;
    Batch* instanceBatch;

    /* invoke-specific */
    const char* rqtMethod;
    const char* rqtServer;
}
WSMAN_WSHeader;

typedef struct _WSMAN_AssociationFilter
{
    const char* address;
    MI_Instance* referenceParameters;
    const char* associationClassName;
    const char* resultClassName;
    const char* role;
    const char* resultRole;
}
WSMAN_AssociationFilter;

typedef struct _WSMAN_WSEnumeratePullBody
{
    /* Attributes of the enumerate/Pull request */
    MI_Uint32   maxElements;
    MI_Uint32   polymorphismMode;   /* WSMANTAG_ENUM_POLYMORPHISM_MODE_xxx */
    MI_Uint32   enumerationMode;     /* WSMANTAG_ENUM_MODE_xxx */
    MI_Boolean  allowOptimization;  /* tag wsman:OptimizeEnumeration present */
    /* Pull-specific */
    MI_Uint32   enumerationContextID;

    /* Fields from <w:Filter Dialect="?"> ... </w:Filter> element */
    const char* dialect;
    const char* filter;

    /* Holds results from <b:AssociatedInstances> element */
    MI_Boolean foundAssociationFilter;
    WSMAN_AssociationFilter associationFilter;
}
WSMAN_WSEnumeratePullBody;

/* WS xml parsing routines */
int WS_ParseSoapEnvelope(
    XML* xml);

int WS_ParseWSHeader(
    XML* xml,
    WSMAN_WSHeader* wsheader);

int WS_ParseEnumerateBody(
    XML* xml, 
    Batch** batch,
    WSMAN_WSEnumeratePullBody* wsenumbody);

int WS_ParsePullBody(
    XML* xml, 
    WSMAN_WSEnumeratePullBody* wsenumpullbody);

int WS_ParseReleaseBody(
    XML* xml, 
    WSMAN_WSEnumeratePullBody* wsenumpullbody);

int WS_ParseInvokeBody(
    XML* xml, 
    Batch*  dynamicBatch,
    MI_Instance** dynamicInstanceParams);

int WS_ParseCreateBody(
    XML* xml, 
    Batch*  dynamicBatch,
    MI_Instance** dynamicInstanceParams);

int WS_ParseIdentifyBody(
    XML* xml);

END_EXTERNC

#endif /* _omi_wsmanparser_h */

ViewCVS 0.9.2