TuttleOFX
1
|
00001 #ifndef _ofxPropertyHost_h_ 00002 #define _ofxPropertyHost_h_ 00003 00004 /* 00005 * Software License : 00006 * 00007 * Copyright (c) 2003-2009, The Open Effects Association Ltd. All rights reserved. 00008 * 00009 * Redistribution and use in source and binary forms, with or without 00010 * modification, are permitted provided that the following conditions are met: 00011 * 00012 * Redistributions of source code must retain the above copyright notice, 00013 * this list of conditions and the following disclaimer. 00014 * Redistributions in binary form must reproduce the above copyright notice, 00015 * this list of conditions and the following disclaimer in the documentation 00016 * and/or other materials provided with the distribution. 00017 * Neither the name The Open Effects Association Ltd, nor the names of its 00018 * contributors may be used to endorse or promote products derived from this 00019 * software without specific prior written permission. 00020 * 00021 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 00022 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 00023 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 00024 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 00025 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 00026 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 00027 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 00028 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 00029 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 00030 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00031 */ 00032 00033 #include "ofxCore.h" 00034 00035 #ifdef __cplusplus 00036 extern "C" { 00037 #endif 00038 00039 /** @file ofxProperty.h 00040 * Contains the API for manipulating generic properties. For more details see \ref PropertiesPage. 00041 */ 00042 00043 #define kOfxPropertySuite "OfxPropertySuite" 00044 00045 /** @brief The OFX suite used to access properties on OFX objects. 00046 * 00047 */ 00048 typedef struct OfxPropertySuiteV1 00049 { 00050 /** @brief Set a single value in a pointer property 00051 * 00052 * @param properties is the handle of the thing holding the property 00053 * @param property is the string labelling the property 00054 * @param index is for multidimenstional properties and is dimension of the one we are setting 00055 * @param value is the value of the property we are setting 00056 * 00057 * @returns 00058 * - ::kOfxStatOK 00059 * - ::kOfxStatErrBadHandle 00060 * - ::kOfxStatErrUnknown 00061 * - ::kOfxStatErrBadIndex 00062 * - ::kOfxStatErrValue 00063 */ 00064 OfxStatus ( *propSetPointer )( OfxPropertySetHandle properties, const char* property, int index, void* value ); 00065 00066 /** @brief Set a single value in a string property 00067 * 00068 * @param properties is the handle of the thing holding the property 00069 * @param property is the string labelling the property 00070 * @param index is for multidimenstional properties and is dimension of the one we are setting 00071 * @param value is the value of the property we are setting 00072 * 00073 * @returns 00074 * - ::kOfxStatOK 00075 * - ::kOfxStatErrBadHandle 00076 * - ::kOfxStatErrUnknown 00077 * - ::kOfxStatErrBadIndex 00078 * - ::kOfxStatErrValue 00079 */ 00080 OfxStatus ( *propSetString )( OfxPropertySetHandle properties, const char* property, int index, const char* value ); 00081 00082 /** @brief Set a single value in a double property 00083 * 00084 * @param properties is the handle of the thing holding the property 00085 * @param property is the string labelling the property 00086 * @param index is for multidimenstional properties and is dimension of the one we are setting 00087 * @param value is the value of the property we are setting 00088 * 00089 * @returns 00090 * - ::kOfxStatOK 00091 * - ::kOfxStatErrBadHandle 00092 * - ::kOfxStatErrUnknown 00093 * - ::kOfxStatErrBadIndex 00094 * - ::kOfxStatErrValue 00095 */ 00096 OfxStatus ( *propSetDouble )( OfxPropertySetHandle properties, const char* property, int index, double value ); 00097 00098 /** @brief Set a single value in an int property 00099 * 00100 * @param properties is the handle of the thing holding the property 00101 * @param property is the string labelling the property 00102 * @param index is for multidimenstional properties and is dimension of the one we are setting 00103 * @param value is the value of the property we are setting 00104 * 00105 * @returns 00106 * - ::kOfxStatOK 00107 * - ::kOfxStatErrBadHandle 00108 * - ::kOfxStatErrUnknown 00109 * - ::kOfxStatErrBadIndex 00110 * - ::kOfxStatErrValue 00111 */ 00112 OfxStatus ( *propSetInt )( OfxPropertySetHandle properties, const char* property, int index, int value ); 00113 00114 /** @brief Set multiple values of the pointer property 00115 * 00116 * @param properties is the handle of the thing holding the property 00117 * @param property is the string labelling the property 00118 * @param count is the number of values we are setting in that property (ie: indicies 0..count-1) 00119 * @param value is a pointer to an array of property values 00120 * 00121 * @returns 00122 * - ::kOfxStatOK 00123 * - ::kOfxStatErrBadHandle 00124 * - ::kOfxStatErrUnknown 00125 * - ::kOfxStatErrBadIndex 00126 * - ::kOfxStatErrValue 00127 */ 00128 OfxStatus ( *propSetPointerN )( OfxPropertySetHandle properties, const char* property, int count, void** value ); 00129 00130 /** @brief Set multiple values of a string property 00131 * 00132 * @param properties is the handle of the thing holding the property 00133 * @param property is the string labelling the property 00134 * @param count is the number of values we are setting in that property (ie: indicies 0..count-1) 00135 * @param value is a pointer to an array of property values 00136 * 00137 * @returns 00138 * - ::kOfxStatOK 00139 * - ::kOfxStatErrBadHandle 00140 * - ::kOfxStatErrUnknown 00141 * - ::kOfxStatErrBadIndex 00142 * - ::kOfxStatErrValue 00143 */ 00144 OfxStatus ( *propSetStringN )( OfxPropertySetHandle properties, const char* property, int count, const char** value ); 00145 00146 /** @brief Set multiple values of a double property 00147 * 00148 * @param properties is the handle of the thing holding the property 00149 * @param property is the string labelling the property 00150 * @param count is the number of values we are setting in that property (ie: indicies 0..count-1) 00151 * @param value is a pointer to an array of property values 00152 * 00153 * @returns 00154 * - ::kOfxStatOK 00155 * - ::kOfxStatErrBadHandle 00156 * - ::kOfxStatErrUnknown 00157 * - ::kOfxStatErrBadIndex 00158 * - ::kOfxStatErrValue 00159 * 00160 */ 00161 OfxStatus ( *propSetDoubleN )( OfxPropertySetHandle properties, const char* property, int count, double* value ); 00162 00163 /** @brief Set multiple values of an int property 00164 * 00165 * @param properties is the handle of the thing holding the property 00166 * @param property is the string labelling the property 00167 * @param count is the number of values we are setting in that property (ie: indicies 0..count-1) 00168 * @param value is a pointer to an array of property values 00169 * 00170 * @returns 00171 * - ::kOfxStatOK 00172 * - ::kOfxStatErrBadHandle 00173 * - ::kOfxStatErrUnknown 00174 * - ::kOfxStatErrBadIndex 00175 * - ::kOfxStatErrValue 00176 * 00177 */ 00178 OfxStatus ( *propSetIntN )( OfxPropertySetHandle properties, const char* property, int count, int* value ); 00179 00180 /** @brief Get a single value from a pointer property 00181 * 00182 * @param properties is the handle of the thing holding the property 00183 * @param property is the string labelling the property 00184 * @param index refers to the index of a multi-dimensional property 00185 * @param value is a pointer the return location 00186 * 00187 * @returns 00188 * - ::kOfxStatOK 00189 * - ::kOfxStatErrBadHandle 00190 * - ::kOfxStatErrUnknown 00191 * - ::kOfxStatErrBadIndex 00192 */ 00193 OfxStatus ( *propGetPointer )( OfxPropertySetHandle properties, const char* property, int index, void** value ); 00194 00195 /** @brief Get a single value of a string property 00196 * 00197 * @param properties is the handle of the thing holding the property 00198 * @param property is the string labelling the property 00199 * @param index refers to the index of a multi-dimensional property 00200 * @param value is a pointer the return location 00201 * 00202 * @returns 00203 * - ::kOfxStatOK 00204 * - ::kOfxStatErrBadHandle 00205 * - ::kOfxStatErrUnknown 00206 * - ::kOfxStatErrBadIndex 00207 */ 00208 OfxStatus ( *propGetString )( OfxPropertySetHandle properties, const char* property, int index, char** value ); 00209 00210 /** @brief Get a single value of a double property 00211 * 00212 * @param properties is the handle of the thing holding the property 00213 * @param property is the string labelling the property 00214 * @param index refers to the index of a multi-dimensional property 00215 * @param value is a pointer the return location 00216 * 00217 * See the note \ref ArchitectureStrings for how to deal with strings. 00218 * 00219 * @returns 00220 * - ::kOfxStatOK 00221 * - ::kOfxStatErrBadHandle 00222 * - ::kOfxStatErrUnknown 00223 * - ::kOfxStatErrBadIndex 00224 */ 00225 OfxStatus ( *propGetDouble )( OfxPropertySetHandle properties, const char* property, int index, double* value ); 00226 00227 /** @brief Get a single value of an int property 00228 * 00229 * @param properties is the handle of the thing holding the property 00230 * @param property is the string labelling the property 00231 * @param index refers to the index of a multi-dimensional property 00232 * @param value is a pointer the return location 00233 * 00234 * @returns 00235 * - ::kOfxStatOK 00236 * - ::kOfxStatErrBadHandle 00237 * - ::kOfxStatErrUnknown 00238 * - ::kOfxStatErrBadIndex 00239 */ 00240 OfxStatus ( *propGetInt )( OfxPropertySetHandle properties, const char* property, int index, int* value ); 00241 00242 /** @brief Get multiple values of a pointer property 00243 * 00244 * @param properties is the handle of the thing holding the property 00245 * @param property is the string labelling the property 00246 * @param count is the number of values we are getting of that property (ie: indicies 0..count-1) 00247 * @param value is a pointer to an array of where we will return the property values 00248 * 00249 * @returns 00250 * - ::kOfxStatOK 00251 * - ::kOfxStatErrBadHandle 00252 * - ::kOfxStatErrUnknown 00253 * - ::kOfxStatErrBadIndex 00254 */ 00255 OfxStatus ( *propGetPointerN )( OfxPropertySetHandle properties, const char* property, int count, void** value ); 00256 00257 /** @brief Get multiple values of a string property 00258 * 00259 * @param properties is the handle of the thing holding the property 00260 * @param property is the string labelling the property 00261 * @param count is the number of values we are getting of that property (ie: indicies 0..count-1) 00262 * @param value is a pointer to an array of where we will return the property values 00263 * 00264 * See the note \ref ArchitectureStrings for how to deal with strings. 00265 * 00266 * @returns 00267 * - ::kOfxStatOK 00268 * - ::kOfxStatErrBadHandle 00269 * - ::kOfxStatErrUnknown 00270 * - ::kOfxStatErrBadIndex 00271 */ 00272 OfxStatus ( *propGetStringN )( OfxPropertySetHandle properties, const char* property, int count, char** value ); 00273 00274 /** @brief Get multiple values of a double property 00275 * 00276 * @param properties is the handle of the thing holding the property 00277 * @param property is the string labelling the property 00278 * @param count is the number of values we are getting of that property (ie: indicies 0..count-1) 00279 * @param value is a pointer to an array of where we will return the property values 00280 * 00281 * @returns 00282 * - ::kOfxStatOK 00283 * - ::kOfxStatErrBadHandle 00284 * - ::kOfxStatErrUnknown 00285 * - ::kOfxStatErrBadIndex 00286 */ 00287 OfxStatus ( *propGetDoubleN )( OfxPropertySetHandle properties, const char* property, int count, double* value ); 00288 00289 /** @brief Get multiple values of an int property 00290 * 00291 * @param properties is the handle of the thing holding the property 00292 * @param property is the string labelling the property 00293 * @param count is the number of values we are getting of that property (ie: indicies 0..count-1) 00294 * @param value is a pointer to an array of where we will return the property values 00295 * 00296 * @returns 00297 * - ::kOfxStatOK 00298 * - ::kOfxStatErrBadHandle 00299 * - ::kOfxStatErrUnknown 00300 * - ::kOfxStatErrBadIndex 00301 */ 00302 OfxStatus ( *propGetIntN )( OfxPropertySetHandle properties, const char* property, int count, int* value ); 00303 00304 /** @brief Resets all dimensions of a property to it's default value 00305 * 00306 * @param properties is the handle of the thing holding the property 00307 * @param property is the string labelling the property we are resetting 00308 * 00309 * @returns 00310 * - ::kOfxStatOK 00311 * - ::kOfxStatErrBadHandle 00312 * - ::kOfxStatErrUnknown 00313 */ 00314 OfxStatus ( *propReset )( OfxPropertySetHandle properties, const char* property ); 00315 00316 /** @brief Gets the dimension of the property 00317 * 00318 * @param properties is the handle of the thing holding the property 00319 * @param property is the string labelling the property we are resetting 00320 * @param count is a pointer to an integer where the value is returned 00321 * 00322 * @returns 00323 * - ::kOfxStatOK 00324 * - ::kOfxStatErrBadHandle 00325 * - ::kOfxStatErrUnknown 00326 */ 00327 OfxStatus ( *propGetDimension )( OfxPropertySetHandle properties, const char* property, int* count ); 00328 } OfxPropertySuiteV1; 00329 00330 /** 00331 * @addtogroup ErrorCodes 00332 */ 00333 /*@{*/ 00334 00335 00336 /*@}*/ 00337 00338 00339 00340 #ifdef __cplusplus 00341 } 00342 #endif 00343 00344 00345 #endif