update dev300-m58
[ooovba.git] / cppu / inc / uno / sequence2.h
blob37301cdf26f841edaa3172b3d1af87f091c7064e
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: sequence2.h,v $
10 * $Revision: 1.9 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _UNO_SEQUENCE2_H_
31 #define _UNO_SEQUENCE2_H_
33 #include <sal/types.h>
34 #include <uno/data.h>
36 #ifdef __cplusplus
37 extern "C"
39 #endif
41 struct _typelib_TypeDescriptionReference;
42 struct _typelib_TypeDescription;
43 typedef sal_Sequence uno_Sequence;
45 /** Assigns a sequence.
47 @param ppDest destinstaion sequence
48 @param pSource source sequence
49 @param pTypeDescr type description of the sequence and NOT of an element
50 @param release function called each time an interface needs to
51 be released; defaults (0) to uno
53 void SAL_CALL uno_sequence_assign(
54 uno_Sequence ** ppDest,
55 uno_Sequence * pSource,
56 struct _typelib_TypeDescription * pTypeDescr,
57 uno_ReleaseFunc release )
58 SAL_THROW_EXTERN_C();
59 /** Assigns a sequence.
61 @param ppDest destinstaion sequence
62 @param pSource source sequence
63 @param pType type of the sequence and NOT of an element
64 @param release function called each time an interface needs to
65 be released; defaults (0) to uno
67 void SAL_CALL uno_type_sequence_assign(
68 uno_Sequence ** ppDest,
69 uno_Sequence * pSource,
70 struct _typelib_TypeDescriptionReference * pType,
71 uno_ReleaseFunc release )
72 SAL_THROW_EXTERN_C();
74 /** Constructs a new sequence with given elements.
76 @param ppSequence out parameter sequence;
77 0 if memory allocation has failed
78 @param pTypeDescr type description of the sequence and NOT of an
79 element
80 @param pElements if 0, then all elements are default constructed
81 @param len number of elements
82 @param acquire function called each time an interface needs to
83 be acquired; defaults (0) to uno
84 @return false, if memoray allocation has failed
86 sal_Bool SAL_CALL uno_sequence_construct(
87 uno_Sequence ** ppSequence,
88 struct _typelib_TypeDescription * pTypeDescr,
89 void * pElements, sal_Int32 len,
90 uno_AcquireFunc acquire )
91 SAL_THROW_EXTERN_C();
92 /** Constructs a new sequence with given elements.
94 @param ppSequence out parameter sequence;
95 0 if memory allocation has failed
96 @param pType type of the sequence and NOT of an element
97 @param pElements if 0, then all elements are default constructed
98 @param len number of elements
99 @param acquire function called each time an interface needs to
100 be acquired; defaults (0) to uno
101 @return false, if memoray allocation has failed
103 sal_Bool SAL_CALL uno_type_sequence_construct(
104 uno_Sequence ** ppSequence,
105 struct _typelib_TypeDescriptionReference * pType,
106 void * pElements, sal_Int32 len,
107 uno_AcquireFunc acquire )
108 SAL_THROW_EXTERN_C();
110 /** Assures that the reference count of the given sequence is one.
111 Otherwise a new copy of the sequence is created with a reference count
112 of one.
114 @param ppSequence inout sequence
115 @param pTypeDescr type description of sequence
116 @param acquire function called each time an interface needs to
117 be acquired; defaults (0) to uno
118 @param release function called each time an interface needs to
119 be released; defaults (0) to uno
120 @return false, if memoray allocation has failed
122 sal_Bool SAL_CALL uno_sequence_reference2One(
123 uno_Sequence ** ppSequence,
124 struct _typelib_TypeDescription * pTypeDescr,
125 uno_AcquireFunc acquire,
126 uno_ReleaseFunc release )
127 SAL_THROW_EXTERN_C();
128 /** Assures that the reference count of the given sequence is one.
129 Otherwise a new copy of the sequence is created with a reference count
130 of one.
132 @param ppSequence inout sequence
133 @param pType type of sequence
134 @param acquire function called each time an interface needs to
135 be acquired; defaults (0) to uno
136 @param release function called each time an interface needs to
137 be released; defaults (0) to uno
138 @return false, if memoray allocation has failed
140 sal_Bool SAL_CALL uno_type_sequence_reference2One(
141 uno_Sequence ** ppSequence,
142 struct _typelib_TypeDescriptionReference * pType,
143 uno_AcquireFunc acquire,
144 uno_ReleaseFunc release )
145 SAL_THROW_EXTERN_C();
147 /** Reallocates length of a sequence. This truncates a sequence or enlarges
148 it default constructing appended elements.
150 @param ppSequence inout sequence
151 @param pTypeDescr type description of sequence
152 @param nSize new size of sequence
153 @param acquire function called each time an interface needs to
154 be acquired; defaults (0) to uno
155 @param release function called each time an interface needs to
156 be released; defaults (0) to uno
157 @return false, if memoray allocation has failed
159 sal_Bool SAL_CALL uno_sequence_realloc(
160 uno_Sequence ** ppSequence,
161 struct _typelib_TypeDescription * pTypeDescr,
162 sal_Int32 nSize,
163 uno_AcquireFunc acquire,
164 uno_ReleaseFunc release )
165 SAL_THROW_EXTERN_C();
166 /** Reallocates length of a sequence. This truncates a sequence or enlarges
167 it default constructing appended elements.
169 @param ppSequence inout sequence
170 @param pType type of sequence
171 @param nSize new size of sequence
172 @param acquire function called each time an interface needs to
173 be acquired; defaults (0) to uno
174 @param release function called each time an interface needs to
175 be released; defaults (0) to uno
176 @return false, if memoray allocation has failed
178 sal_Bool SAL_CALL uno_type_sequence_realloc(
179 uno_Sequence ** ppSequence,
180 struct _typelib_TypeDescriptionReference * pType,
181 sal_Int32 nSize,
182 uno_AcquireFunc acquire,
183 uno_ReleaseFunc release )
184 SAL_THROW_EXTERN_C();
186 #ifdef __cplusplus
188 #endif
190 #endif