libopc
relation.h
Go to the documentation of this file.
1 /*
2  Copyright (c) 2010, Florian Reuter
3  All rights reserved.
4 
5  Redistribution and use in source and binary forms, with or without
6  modification, are permitted provided that the following conditions
7  are met:
8 
9  * Redistributions of source code must retain the above copyright
10  notice, this list of conditions and the following disclaimer.
11  * Redistributions in binary form must reproduce the above copyright
12  notice, this list of conditions and the following disclaimer in
13  the documentation and/or other materials provided with the
14  distribution.
15  * Neither the name of Florian Reuter nor the names of its contributors
16  may be used to endorse or promote products derived from this
17  software without specific prior written permission.
18 
19  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
22  FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
23  COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
24  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
25  BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
28  STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
30  OF THE POSSIBILITY OF SUCH DAMAGE.
31 
32 */
36 #include <opc/config.h>
37 
38 #ifndef OPC_RELATION_H
39 #define OPC_RELATION_H
40 
41 #ifdef __cplusplus
42 extern "C" {
43 #endif
44 
49 
53 #define OPC_RELATION_INVALID (-1)
54 
61  opcRelation opcRelationFind(opcContainer *container, opcPart part, const xmlChar *relationId, const xmlChar *mimeType);
62 
67  opc_error_t opcRelationDelete(opcContainer *container, opcPart part, const xmlChar *relationId, const xmlChar *mimeType);
68 
93  opcRelation opcRelationFirst(opcContainer *container, opcPart part);
94 
98  opcRelation opcRelationNext(opcContainer *container, opcPart part, opcRelation relation);
99 
105  opcPart opcRelationGetInternalTarget(opcContainer *container, opcPart part, opcRelation relation);
106 
112  const xmlChar *opcRelationGetExternalTarget(opcContainer *container, opcPart part, opcRelation relation);
113 
118  const xmlChar *opcRelationGetType(opcContainer *container, opcPart part, opcRelation relation);
119 
124  void opcRelationGetInformation(opcContainer *container, opcPart part, opcRelation relation, const xmlChar **prefix, opc_uint32_t *counter, const xmlChar **type);
125 
129  opc_uint32_t opcRelationAdd(opcContainer *container, opcPart src, const xmlChar *rid, opcPart dest, const xmlChar *type);
130 
134  opc_uint32_t opcRelationAddExternal(opcContainer *container, opcPart src, const xmlChar *rid, const xmlChar *target, const xmlChar *type);
135 
136 #ifdef __cplusplus
137 } /* extern "C" */
138 #endif
139 
140 #endif /* OPC_RELATION_H */
const xmlChar * opcRelationGetExternalTarget(opcContainer *container, opcPart part, opcRelation relation)
Definition: relation.c:85
opcRelation opcRelationNext(opcContainer *container, opcPart part, opcRelation relation)
Definition: relation.c:103
const xmlChar * opcRelationGetType(opcContainer *container, opcPart part, opcRelation relation)
Definition: relation.c:155
xmlChar * opcPart
Definition: part.h:48
opcRelation opcRelationFind(opcContainer *container, opcPart part, const xmlChar *relationId, const xmlChar *mimeType)
Definition: relation.c:55
opcPart opcRelationGetInternalTarget(opcContainer *container, opcPart part, opcRelation relation)
Definition: relation.c:76
opc_uint32_t opcRelationAddExternal(opcContainer *container, opcPart src, const xmlChar *rid, const xmlChar *target, const xmlChar *type)
Definition: container.c:1359
puint32_t opc_uint32_t
Definition: config.h:103
void opcRelationGetInformation(opcContainer *container, opcPart part, opcRelation relation, const xmlChar **prefix, opc_uint32_t *counter, const xmlChar **type)
Definition: relation.c:129
Definition: internal.h:181
opc_uint32_t opcRelationAdd(opcContainer *container, opcPart src, const xmlChar *rid, opcPart dest, const xmlChar *type)
Definition: container.c:1325
enum OPC_ERROR_ENUM opc_error_t
opc_error_t opcRelationDelete(opcContainer *container, opcPart part, const xmlChar *relationId, const xmlChar *mimeType)
Definition: relation.c:145
opcRelation opcRelationFirst(opcContainer *container, opcPart part)
Definition: relation.c:94
opc_uint32_t opcRelation
Definition: relation.h:48