Changeset 642 for BAORadio/libindi/libindi/libs/indibase/basedriver.cpp
- Timestamp:
- Feb 24, 2012, 12:37:36 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BAORadio/libindi/libindi/libs/indibase/basedriver.cpp
r504 r642 1 /******************************************************************************* 2 Copyright(c) 2011 Jasem Mutlaq. All rights reserved. 3 4 This library is free software; you can redistribute it and/or 5 modify it under the terms of the GNU Library General Public 6 License version 2 as published by the Free Software Foundation. 7 8 This library is distributed in the hope that it will be useful, 9 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 Library General Public License for more details. 12 13 You should have received a copy of the GNU Library General Public License 14 along with this library; see the file COPYING.LIB. If not, write to 15 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 16 Boston, MA 02110-1301, USA. 17 *******************************************************************************/ 18 1 19 #include <stdlib.h> 2 20 #include <string.h> … … 9 27 #include "base64.h" 10 28 29 PropertyContainer::PropertyContainer() 30 { 31 pPtr = NULL; 32 pRegistered = false; 33 pDynamic = false; 34 pType = INDI_UNKNOWN; 35 } 36 37 PropertyContainer::~PropertyContainer() 38 { 39 // Only delete properties if they were created dynamically via the buildSkeleton 40 // function. Other drivers are responsible for their own memory allocation. 41 if (pDynamic) 42 { 43 switch (pType) 44 { 45 case INDI_NUMBER: 46 delete ((INumberVectorProperty *) pPtr); 47 break; 48 49 case INDI_TEXT: 50 delete ((ITextVectorProperty *) pPtr); 51 break; 52 53 case INDI_SWITCH: 54 delete ((ISwitchVectorProperty *) pPtr); 55 break; 56 57 case INDI_LIGHT: 58 delete ((ILightVectorProperty *) pPtr); 59 break; 60 61 case INDI_BLOB: 62 delete ((IBLOBVectorProperty *) pPtr); 63 break; 64 65 } 66 } 67 } 68 69 void PropertyContainer::setProperty(void *p) 70 { 71 pRegistered = true; 72 pPtr = p; 73 74 } 75 76 void PropertyContainer::setType(INDI_TYPE t) 77 { 78 pType = t; 79 } 80 81 void PropertyContainer::setRegistered(bool r) 82 { 83 pRegistered = r; 84 } 85 86 void PropertyContainer::setDynamic(bool d) 87 { 88 pDynamic = d; 89 } 90 11 91 INDI::BaseDriver::BaseDriver() 12 92 { 13 93 mediator = NULL; 14 94 lp = newLilXML(); 95 char indidev[MAXINDIDEVICE]; 96 strncpy(indidev, "INDIDEV=", MAXINDIDEVICE); 15 97 16 98 if (getenv("INDIDEV") != NULL) 17 99 { 18 strncpy(deviceID, getenv("INDIDEV"), MAXINDI NAME);19 putenv( "INDIDEV=");100 strncpy(deviceID, getenv("INDIDEV"), MAXINDIDEVICE); 101 putenv(indidev); 20 102 } 21 103 } … … 25 107 { 26 108 delLilXML (lp); 109 while(!pAll.empty()) 110 { 111 delete pAll.back(); 112 pAll.pop_back(); 113 } 27 114 } 28 115 … … 31 118 INumberVectorProperty * nvp = NULL; 32 119 33 nvp = static_cast<INumberVectorProperty *> (getProperty(name, INDI_NUMBER));120 nvp = static_cast<INumberVectorProperty *> (getProperty(name, PropertyContainer::INDI_NUMBER)); 34 121 35 122 return nvp; … … 40 127 ITextVectorProperty * tvp = NULL; 41 128 42 tvp = static_cast<ITextVectorProperty *> (getProperty(name, INDI_TEXT));129 tvp = static_cast<ITextVectorProperty *> (getProperty(name, PropertyContainer::INDI_TEXT)); 43 130 44 131 return tvp; … … 49 136 ISwitchVectorProperty * svp = NULL; 50 137 51 svp = static_cast<ISwitchVectorProperty *> (getProperty(name, INDI_SWITCH));138 svp = static_cast<ISwitchVectorProperty *> (getProperty(name, PropertyContainer::INDI_SWITCH)); 52 139 53 140 return svp; … … 58 145 ILightVectorProperty * lvp = NULL; 59 146 60 lvp = static_cast<ILightVectorProperty *> (getProperty(name, INDI_LIGHT));147 lvp = static_cast<ILightVectorProperty *> (getProperty(name, PropertyContainer::INDI_LIGHT)); 61 148 62 149 return lvp; … … 67 154 IBLOBVectorProperty * bvp = NULL; 68 155 69 bvp = static_cast<IBLOBVectorProperty *> (getProperty(name, INDI_BLOB));156 bvp = static_cast<IBLOBVectorProperty *> (getProperty(name, PropertyContainer::INDI_BLOB)); 70 157 71 158 return bvp; 72 159 } 73 160 74 void * INDI::BaseDriver::getProperty(const char *name, INDI_TYPE type) 75 { 76 std::map< boost::shared_ptr<void>, INDI_TYPE>::iterator orderi; 161 void * INDI::BaseDriver::getProperty(const char *name, PropertyContainer::INDI_TYPE type) 162 { 163 PropertyContainer::INDI_TYPE pType; 164 void *pPtr; 165 bool pRegistered = false; 166 167 std::vector<PropertyContainer *>::iterator orderi; 77 168 78 169 INumberVectorProperty *nvp; … … 84 175 for (orderi = pAll.begin(); orderi != pAll.end(); orderi++) 85 176 { 86 if (type != INDI_UNKNOWN && orderi->second != type) 177 pType = (*orderi)->getType(); 178 pPtr = (*orderi)->getProperty(); 179 pRegistered = (*orderi)->getRegistered(); 180 181 if (type != PropertyContainer::INDI_UNKNOWN && pType != type) 87 182 continue; 88 183 89 switch (orderi->second) 90 { 91 case INDI_NUMBER: 92 nvp = static_cast<INumberVectorProperty *>((orderi->first).get()); 93 if (!strcmp(name, nvp->name)) 94 return (orderi->first).get(); 95 break; 96 case INDI_TEXT: 97 tvp = static_cast<ITextVectorProperty *>((orderi->first).get()); 98 if (!strcmp(name, tvp->name)) 99 return (orderi->first).get(); 100 break; 101 case INDI_SWITCH: 102 svp = static_cast<ISwitchVectorProperty *>((orderi->first).get()); 103 if (!strcmp(name, svp->name)) 104 return (orderi->first).get(); 105 break; 106 case INDI_LIGHT: 107 lvp = static_cast<ILightVectorProperty *>((orderi->first).get()); 108 if (!strcmp(name, lvp->name)) 109 return (orderi->first).get(); 110 break; 111 case INDI_BLOB: 112 bvp = static_cast<IBLOBVectorProperty *>((orderi->first).get()); 113 if (!strcmp(name, bvp->name)) 114 return (orderi->first).get(); 184 switch (pType) 185 { 186 case PropertyContainer::INDI_NUMBER: 187 nvp = static_cast<INumberVectorProperty *>(pPtr); 188 if (nvp == NULL) 189 continue; 190 191 if (!strcmp(name, nvp->name) && pRegistered) 192 return pPtr; 193 break; 194 case PropertyContainer::INDI_TEXT: 195 tvp = static_cast<ITextVectorProperty *>(pPtr); 196 if (tvp == NULL) 197 continue; 198 199 if (!strcmp(name, tvp->name) && pRegistered) 200 return pPtr; 201 break; 202 case PropertyContainer::INDI_SWITCH: 203 svp = static_cast<ISwitchVectorProperty *>(pPtr); 204 if (svp == NULL) 205 continue; 206 207 //IDLog("Switch %s and aux value is now %d\n", svp->name, regStatus ); 208 if (!strcmp(name, svp->name) && pRegistered) 209 return pPtr; 210 break; 211 case PropertyContainer::INDI_LIGHT: 212 lvp = static_cast<ILightVectorProperty *>(pPtr); 213 if (lvp == NULL) 214 continue; 215 216 if (!strcmp(name, lvp->name) && pRegistered) 217 return pPtr; 218 break; 219 case PropertyContainer::INDI_BLOB: 220 bvp = static_cast<IBLOBVectorProperty *>(pPtr); 221 if (bvp == NULL) 222 continue; 223 224 if (!strcmp(name, bvp->name) && pRegistered) 225 return pPtr; 115 226 break; 116 227 } … … 121 232 } 122 233 123 int INDI::BaseDriver::removeProperty(const char *name) 124 { 125 std::map< boost::shared_ptr<void>, INDI_TYPE>::iterator orderi; 234 PropertyContainer * INDI::BaseDriver::getContainer(const char *name, PropertyContainer::INDI_TYPE type) 235 { 236 PropertyContainer::INDI_TYPE pType; 237 void *pPtr; 238 bool pRegistered = false; 239 240 std::vector<PropertyContainer *>::iterator orderi; 126 241 127 242 INumberVectorProperty *nvp; … … 133 248 for (orderi = pAll.begin(); orderi != pAll.end(); orderi++) 134 249 { 135 switch (orderi->second) 136 { 137 case INDI_NUMBER: 138 nvp = static_cast<INumberVectorProperty *>((orderi->first).get()); 250 pType = (*orderi)->getType(); 251 pPtr = (*orderi)->getProperty(); 252 pRegistered = (*orderi)->getRegistered(); 253 254 if (type != PropertyContainer::INDI_UNKNOWN && pType != type) 255 continue; 256 257 switch (pType) 258 { 259 case PropertyContainer::INDI_NUMBER: 260 nvp = static_cast<INumberVectorProperty *>(pPtr); 261 if (nvp == NULL) 262 continue; 263 264 if (!strcmp(name, nvp->name) && pRegistered) 265 return *orderi; 266 break; 267 case PropertyContainer::INDI_TEXT: 268 tvp = static_cast<ITextVectorProperty *>(pPtr); 269 if (tvp == NULL) 270 continue; 271 272 if (!strcmp(name, tvp->name) && pRegistered) 273 return *orderi; 274 break; 275 case PropertyContainer::INDI_SWITCH: 276 svp = static_cast<ISwitchVectorProperty *>(pPtr); 277 if (svp == NULL) 278 continue; 279 280 //IDLog("Switch %s and aux value is now %d\n", svp->name, regStatus ); 281 if (!strcmp(name, svp->name) && pRegistered) 282 return *orderi; 283 break; 284 case PropertyContainer::INDI_LIGHT: 285 lvp = static_cast<ILightVectorProperty *>(pPtr); 286 if (lvp == NULL) 287 continue; 288 289 if (!strcmp(name, lvp->name) && pRegistered) 290 return *orderi; 291 break; 292 case PropertyContainer::INDI_BLOB: 293 bvp = static_cast<IBLOBVectorProperty *>(pPtr); 294 if (bvp == NULL) 295 continue; 296 297 if (!strcmp(name, bvp->name) && pRegistered) 298 return *orderi; 299 break; 300 } 301 302 } 303 304 return NULL; 305 } 306 307 int INDI::BaseDriver::removeProperty(const char *name) 308 { 309 std::vector<PropertyContainer *>::iterator orderi; 310 311 PropertyContainer::INDI_TYPE pType; 312 void *pPtr; 313 314 INumberVectorProperty *nvp; 315 ITextVectorProperty *tvp; 316 ISwitchVectorProperty *svp; 317 ILightVectorProperty *lvp; 318 IBLOBVectorProperty *bvp; 319 320 for (orderi = pAll.begin(); orderi != pAll.end(); orderi++) 321 { 322 pType = (*orderi)->getType(); 323 pPtr = (*orderi)->getProperty(); 324 325 switch (pType) 326 { 327 case PropertyContainer::INDI_NUMBER: 328 nvp = static_cast<INumberVectorProperty *>(pPtr); 139 329 if (!strcmp(name, nvp->name)) 140 330 { 141 pAll.erase(orderi);331 (*orderi)->setRegistered(false); 142 332 return 0; 143 333 } 144 334 break; 145 case INDI_TEXT:146 tvp = static_cast<ITextVectorProperty *>( (orderi->first).get());335 case PropertyContainer::INDI_TEXT: 336 tvp = static_cast<ITextVectorProperty *>(pPtr); 147 337 if (!strcmp(name, tvp->name)) 148 338 { 149 pAll.erase(orderi);339 (*orderi)->setRegistered(false); 150 340 return 0; 151 341 } 152 342 break; 153 case INDI_SWITCH:154 svp = static_cast<ISwitchVectorProperty *>( (orderi->first).get());343 case PropertyContainer::INDI_SWITCH: 344 svp = static_cast<ISwitchVectorProperty *>(pPtr); 155 345 if (!strcmp(name, svp->name)) 156 346 { 157 pAll.erase(orderi);347 (*orderi)->setRegistered(false); 158 348 return 0; 159 349 } 160 350 break; 161 case INDI_LIGHT:162 lvp = static_cast<ILightVectorProperty *>( (orderi->first).get());351 case PropertyContainer::INDI_LIGHT: 352 lvp = static_cast<ILightVectorProperty *>(pPtr); 163 353 if (!strcmp(name, lvp->name)) 164 354 { 165 pAll.erase(orderi);355 (*orderi)->setRegistered(false); 166 356 return 0; 167 357 } 168 358 break; 169 case INDI_BLOB:170 bvp = static_cast<IBLOBVectorProperty *>( (orderi->first).get());359 case PropertyContainer::INDI_BLOB: 360 bvp = static_cast<IBLOBVectorProperty *>(pPtr); 171 361 if (!strcmp(name, bvp->name)) 172 362 { 173 pAll.erase(orderi);363 (*orderi)->setRegistered(false); 174 364 return 0; 175 365 } … … 215 405 IPerm perm; 216 406 IPState state; 217 ISRule rule;218 407 XMLEle *ep = NULL; 219 408 char *rtag, *rname, *rdev; 220 //INDI_TYPE type;221 409 double timeout=0; 222 410 … … 258 446 if (!strcmp (rtag, "defNumberVector")) 259 447 { 260 261 numberPtr nvp(new INumberVectorProperty); 262 //INumberVectorProperty *nvp = new INumberVectorProperty; 263 //INumberVectorProperty *nvp = (INumberVectorProperty *) malloc(sizeof(INumberVectorProperty)); 448 PropertyContainer *indiProp = new PropertyContainer(); 449 INumberVectorProperty *nvp = new INumberVectorProperty; 450 264 451 INumber *np = NULL; 265 452 int n=0; … … 281 468 np = (INumber *) realloc(np, (n+1) * sizeof(INumber)); 282 469 283 np[n].nvp = nvp .get();470 np[n].nvp = nvp; 284 471 285 472 XMLAtt *na = findXMLAtt (ep, "name"); … … 320 507 nvp->nnp = n; 321 508 nvp->np = np; 322 //orderPtr o(new pOrder); 323 //o->p = &nvp; 324 //o->type = INDI_NUMBER; 325 //pAll.push_back(o); 326 pAll[nvp] = INDI_NUMBER; 509 510 indiProp->setProperty(nvp); 511 indiProp->setDynamic(true); 512 indiProp->setType(PropertyContainer::INDI_NUMBER); 513 514 pAll.push_back(indiProp); 515 327 516 //IDLog("Adding number property %s to list.\n", nvp->name); 328 517 if (mediator) … … 334 523 else if (!strcmp (rtag, "defSwitchVector")) 335 524 { 336 switchPtr svp(new ISwitchVectorProperty);337 //ISwitchVectorProperty *svp = new ISwitchVectorProperty;338 //ISwitchVectorProperty *svp = (ISwitchVectorProperty *) malloc(sizeof(ISwitchVectorProperty)); 525 PropertyContainer *indiProp = new PropertyContainer(); 526 ISwitchVectorProperty *svp = new ISwitchVectorProperty; 527 339 528 ISwitch *sp = NULL; 340 529 int n=0; … … 360 549 sp = (ISwitch *) realloc(sp, (n+1) * sizeof(ISwitch)); 361 550 362 sp[n].svp = svp .get();551 sp[n].svp = svp; 363 552 364 553 XMLAtt *na = findXMLAtt (ep, "name"); … … 380 569 svp->nsp = n; 381 570 svp->sp = sp; 382 //orderPtr o(new pOrder); 383 //o->p = &svp; 384 //o->type = INDI_SWITCH; 385 //pAll.push_back(o); 386 pAll[svp] = INDI_SWITCH; 571 572 indiProp->setProperty(svp); 573 indiProp->setDynamic(true); 574 indiProp->setType(PropertyContainer::INDI_SWITCH); 575 576 pAll.push_back(indiProp); 387 577 //IDLog("Adding Switch property %s to list.\n", svp->name); 388 578 if (mediator) … … 396 586 { 397 587 398 //ITextVectorProperty *tvp = new ITextVectorProperty; 399 //ITextVectorProperty *tvp = (ITextVectorProperty *) malloc(sizeof(ITextVectorProperty)); 400 textPtr tvp(new ITextVectorProperty); 588 PropertyContainer *indiProp = new PropertyContainer(); 589 ITextVectorProperty *tvp = new ITextVectorProperty; 401 590 IText *tp = NULL; 402 591 int n=0; … … 418 607 tp = (IText *) realloc(tp, (n+1) * sizeof(IText)); 419 608 420 tp[n].tvp = tvp .get();609 tp[n].tvp = tvp; 421 610 422 611 XMLAtt *na = findXMLAtt (ep, "name"); … … 439 628 tvp->ntp = n; 440 629 tvp->tp = tp; 441 //orderPtr o(new pOrder); 442 //o->p = &tvp; 443 //o->type = INDI_TEXT; 444 //pAll.push_back(o); 445 pAll[tvp] = INDI_TEXT; 630 631 indiProp->setProperty(tvp); 632 indiProp->setDynamic(true); 633 indiProp->setType(PropertyContainer::INDI_TEXT); 634 635 pAll.push_back(indiProp); 446 636 //IDLog("Adding Text property %s to list.\n", tvp->name); 447 637 if (mediator) … … 454 644 { 455 645 456 //ILightVectorProperty *lvp = new ILightVectorProperty; 457 //ILightVectorProperty *lvp = (ILightVectorProperty *) malloc(sizeof(ILightVectorProperty)); 458 lightPtr lvp(new ILightVectorProperty); 646 PropertyContainer *indiProp = new PropertyContainer(); 647 ILightVectorProperty *lvp = new ILightVectorProperty; 459 648 ILight *lp = NULL; 460 649 int n=0; … … 474 663 lp = (ILight *) realloc(lp, (n+1) * sizeof(ILight)); 475 664 476 lp[n].lvp = lvp .get();665 lp[n].lvp = lvp; 477 666 478 667 XMLAtt *na = findXMLAtt (ep, "name"); … … 495 684 lvp->nlp = n; 496 685 lvp->lp = lp; 497 //orderPtr o(new pOrder); 498 //o->p = &lvp; 499 //o->type = INDI_LIGHT; 500 //pAll.push_back(o); 501 pAll[lvp] = INDI_LIGHT; 686 687 indiProp->setProperty(lvp); 688 indiProp->setDynamic(true); 689 indiProp->setType(PropertyContainer::INDI_LIGHT); 690 691 pAll.push_back(indiProp); 692 502 693 //IDLog("Adding Light property %s to list.\n", lvp->name); 503 694 if (mediator) … … 509 700 else if (!strcmp (rtag, "defBLOBVector")) 510 701 { 511 512 //IBLOBVectorProperty *bvp = new IBLOBVectorProperty; 513 //IBLOBVectorProperty *bvp = (IBLOBVectorProperty *) malloc(sizeof(IBLOBVectorProperty)); 514 blobPtr bvp(new IBLOBVectorProperty); 702 PropertyContainer *indiProp = new PropertyContainer(); 703 IBLOBVectorProperty *bvp = new IBLOBVectorProperty; 515 704 IBLOB *bp = NULL; 516 705 int n=0; … … 530 719 bp = (IBLOB *) realloc(bp, (n+1) * sizeof(IBLOB)); 531 720 532 bp[n].bvp = bvp .get();721 bp[n].bvp = bvp; 533 722 534 723 XMLAtt *na = findXMLAtt (ep, "name"); … … 560 749 bvp->nbp = n; 561 750 bvp->bp = bp; 562 //orderPtr o(new pOrder); 563 //o->p = &bvp; 564 //o->type = INDI_BLOB; 565 //pAll.push_back(o); 566 pAll[bvp] = INDI_BLOB; 751 752 indiProp->setProperty(bvp); 753 indiProp->setDynamic(true); 754 indiProp->setType(PropertyContainer::INDI_BLOB); 755 756 pAll.push_back(indiProp); 567 757 //IDLog("Adding BLOB property %s to list.\n", bvp->name); 568 758 if (mediator) … … 913 1103 } 914 1104 915 void INDI::BaseDriver::registerProperty(void *p, INDI_TYPE type)916 { 917 918 919 if (type == INDI_NUMBER)1105 void INDI::BaseDriver::registerProperty(void *p, PropertyContainer::INDI_TYPE type) 1106 { 1107 PropertyContainer *pContainer; 1108 1109 if (type == PropertyContainer::INDI_NUMBER) 920 1110 { 921 1111 INumberVectorProperty *nvp = static_cast<INumberVectorProperty *> (p); 922 if (getProperty(nvp->name, INDI_NUMBER) != NULL) 1112 if ( (pContainer = getContainer(nvp->name, PropertyContainer::INDI_NUMBER)) != NULL) 1113 { 1114 pContainer->setRegistered(true); 923 1115 return; 924 925 numberPtr ovp(nvp); 926 927 pAll[ovp] = INDI_NUMBER; 928 } 929 else if (type == INDI_TEXT) 1116 } 1117 1118 pContainer = new PropertyContainer(); 1119 pContainer->setProperty(p); 1120 pContainer->setType(type); 1121 1122 pAll.push_back(pContainer); 1123 1124 } 1125 else if (type == PropertyContainer::INDI_TEXT) 930 1126 { 931 1127 ITextVectorProperty *tvp = static_cast<ITextVectorProperty *> (p); 932 if (getProperty(tvp->name, INDI_TEXT) != NULL) 1128 1129 if ( (pContainer = getContainer(tvp->name, PropertyContainer::INDI_TEXT)) != NULL) 1130 { 1131 pContainer->setRegistered(true); 933 1132 return; 934 935 textPtr ovp(tvp); 936 //o->p = &ovp; 937 938 pAll[ovp] = INDI_TEXT; 1133 } 1134 1135 pContainer = new PropertyContainer(); 1136 pContainer->setProperty(p); 1137 pContainer->setType(type); 1138 1139 pAll.push_back(pContainer); 1140 1141 939 1142 } 940 else if (type == INDI_SWITCH)1143 else if (type == PropertyContainer::INDI_SWITCH) 941 1144 { 942 1145 ISwitchVectorProperty *svp = static_cast<ISwitchVectorProperty *> (p); 943 if (getProperty(svp->name, INDI_SWITCH) != NULL) 1146 1147 if ( (pContainer = getContainer(svp->name, PropertyContainer::INDI_SWITCH)) != NULL) 1148 { 1149 pContainer->setRegistered(true); 944 1150 return; 945 946 switchPtr ovp(svp); 947 //o->p = &ovp; 948 949 IDLog("Registering switch %s\n", svp->name); 950 951 pAll[ovp] = INDI_SWITCH; 952 } 953 else if (type == INDI_LIGHT) 1151 } 1152 1153 pContainer = new PropertyContainer(); 1154 pContainer->setProperty(p); 1155 pContainer->setType(type); 1156 1157 pAll.push_back(pContainer); 1158 1159 } 1160 else if (type == PropertyContainer::INDI_LIGHT) 954 1161 { 955 1162 ILightVectorProperty *lvp = static_cast<ILightVectorProperty *> (p); 956 if (getProperty(lvp->name, INDI_LIGHT) != NULL) 1163 1164 if ( (pContainer = getContainer(lvp->name, PropertyContainer::INDI_LIGHT)) != NULL) 1165 { 1166 pContainer->setRegistered(true); 957 1167 return; 958 959 lightPtr ovp(lvp); 960 //o->p = &ovp; 961 pAll[ovp] = INDI_LIGHT; 1168 } 1169 1170 pContainer = new PropertyContainer(); 1171 pContainer->setProperty(p); 1172 pContainer->setType(type); 1173 1174 pAll.push_back(pContainer); 962 1175 } 963 else if (type == INDI_BLOB)1176 else if (type == PropertyContainer::INDI_BLOB) 964 1177 { 965 1178 IBLOBVectorProperty *bvp = static_cast<IBLOBVectorProperty *> (p); 966 if (getProperty(bvp->name, INDI_BLOB) != NULL) 1179 1180 if ( (pContainer = getContainer(bvp->name, PropertyContainer::INDI_BLOB)) != NULL) 1181 { 1182 pContainer->setRegistered(true); 967 1183 return; 968 969 blobPtr ovp(bvp); 970 //o->p = &ovp; 971 972 pAll[ovp] = INDI_BLOB; 973 } 974 975 } 976 1184 } 1185 1186 pContainer = new PropertyContainer(); 1187 pContainer->setProperty(p); 1188 pContainer->setType(type); 1189 1190 pAll.push_back(pContainer); 1191 1192 } 1193 1194 } 1195
Note: See TracChangeset
for help on using the changeset viewer.