This file is indexed.

/usr/include/openwsman/wsman-epr.h is in libopenwsman-dev 2.6.5-0ubuntu3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
/*******************************************************************************
 * Copyright (C) 2004-2006 Intel Corp. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 *  - Redistributions of source code must retain the above copyright notice,
 *    this list of conditions and the following disclaimer.
 *
 *  - Redistributions in binary form must reproduce the above copyright notice,
 *    this list of conditions and the following disclaimer in the documentation
 *    and/or other materials provided with the distribution.
 *
 *  - Neither the name of Intel Corp. nor the names of its
 *    contributors may be used to endorse or promote products derived from this
 *    software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL Intel Corp. OR THE CONTRIBUTORS
 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 *******************************************************************************/

/**
 * @author Anas Nashif, Intel Corp.
 * @author Liang Hou, Intel Corp.
 */

#ifndef WSMAN_EPR_H_
#define WSMAN_EPR_H_

#ifdef __cplusplus
extern "C" {
#endif				/* __cplusplus */

#include "wsman-types.h"
#include "wsman-key-value.h"
#include "u/hash.h"

typedef struct {
	unsigned int count;
	key_value_t *selectors;
} SelectorSet;



typedef struct {
	char * uri;
	SelectorSet selectorset;
} ReferenceParameters;


typedef struct epr_struct {
	char * address;
	ReferenceParameters refparams;
	void * additionalParams;
} epr_t;

/* support for array values, all represented with the same key */	
typedef struct {
	char * key;
	void * data;
	int arraycount;
} methodarglist_t;

typedef int (*selector_callback ) (void *data, const key_value_t *kv);

void wsman_epr_selector_cb(const epr_t *epr, selector_callback cb,
		void *cb_data);

void wsman_selectorset_cb(SelectorSet *selectorset, selector_callback cb,
		void *cb_data);

/* get string value of selector by name
 * returns NULL if the selector value is an epr_t
 */
char *wsman_epr_selector_by_name(const epr_t *epr, const char* name);

int epr_selector_count(const epr_t *epr);

char *epr_get_resource_uri(const epr_t *epr);

 /**
 * Create an epr_t structure
 * @param uri Resource URI string
 * @param selectors A hash which contains pairs of name:selector_entry
 * @param address If it is NULL, "http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous"
                             will be set
 * @return created epr_t address
 */
epr_t *epr_create(const char *uri, hash_t * selectors,
		const char *address);
/**
 * Create an epr_t from a string
 * @param str A string in a format of "Resource_uri?name1=value1&name2=value2"
 * @return created epr_t address
 */
 epr_t *epr_from_string(const char* str);

/**
 * Add a new text selector to an exsiting epr
 * @param epr Point of epr_t
 * @param name Name of selector
 * @param selector Point of seletor_entry
 * @return 0 for sucess, others for failure
 */
int epr_add_selector_text(epr_t *epr, const char *name, const char *text);

/**
 * Add a new epr selector to an exsiting epr
 * @param epr Point of epr_t
 * @param name Name of selector
 * @param selector Point of seletor_entry
 * @return 0 for sucess, others for failure
 */
int epr_add_selector_epr(epr_t *epr, const char *name, epr_t *added_epr);

/**
 * Delete an selector from an epr by name
 * @param epr Point of epr_t
 * @param name Name of selector name
 * @return 0 for sucess, others for failure
 */
int epr_delete_selector(epr_t *epr, const char *name);

 /**
 * Destroy an epr_t structure
 * @param epr An epr point
 * @return void
 */
void epr_destroy(epr_t *epr);

 /**
 * Create a new epr_t from an original epr_t
 * @param epr An epr point
 * @return created epr_t address
 */
epr_t *epr_copy(const epr_t *epr);

/**
 * Compare two epr_ts
 * @param epr1
 * @param epr2
 * @return 0 for equality, others mean inequality
 */
 int epr_cmp(const epr_t *epr1, const epr_t *epr2);

/**
 * Turn an epr_t structure to an XML snippet.
 * @param node XML node which will contain epr XML snippet
 * @param ns Namespace of EPR wrapper name
 * @param epr_node_name EPR wrapper name
 * @param epr A point of epr_t
 * @param embedded It means a complete epr snippet if embedded is 1. Or else, it is
                                 a snippet used in a soap header.
 * @return 0 for success, others for failure
 */
int epr_serialize(WsXmlNodeH node, const char *ns,
		const char *epr_node_name, const epr_t *epr, int embedded);

/**
 * Form an epr_t structure from an XML snippet.
 * @param node XML node which contains epr XML snippet
 * @param ns Namespace of EPR wrapper name
 * @param epr_node_name EPR wrapper name
 * @param embedded It means a complete epr snippet if embedded is 1. Or else, it is
                                 a snippet used in a soap header.
 * @return New created epr_t point
 */
epr_t *epr_deserialize(WsXmlNodeH node, const char *ns,
		const char *epr_node_name, int embedded);

/**
 * Get cim namespace selector from a SelectorSet
 * @param selectorset
 * @return CIM namespace if there is
 */
char *get_cimnamespace_from_selectorset(SelectorSet *selectorset);

/**
 * Create a string representation from an epr
 * @param epr_t
 * @return A string in a format of "Resource_uri?name1=value1&name2=value2"
 */
char *epr_to_string(const epr_t* epr);

/**
 * Create an XML representation of epr_t enclosed in <ns:epr_node_name>
 * @return created XML as string
 */

char *epr_to_txt(const epr_t *epr, const char *ns, const char*epr_node_name);

#ifdef __cplusplus
}
#endif				/* __cplusplus */
#endif