00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef ___HxCorbaDatabase_h__
00016 #define ___HxCorbaDatabase_h__
00017
00018 #include <HxCorbaVxSegmentation.h>
00019
00020 #ifndef OB_INTEGER_VERSION
00021 # error No ORBacus version defined! Is <OB/CORBA.h> included?
00022 #endif
00023
00024 #ifndef OB_NO_VERSION_CHECK
00025 # if (OB_INTEGER_VERSION != 4010000L)
00026 # error ORBacus version mismatch!
00027 # endif
00028 #endif
00029
00030 namespace HxCorba
00031 {
00032
00033 class DatabaseSession;
00034 typedef DatabaseSession* DatabaseSession_ptr;
00035 typedef DatabaseSession* DatabaseSessionRef;
00036
00037 extern OB::TypeCodeConst _tc_DatabaseSession;
00038
00039 class Database;
00040 typedef Database* Database_ptr;
00041 typedef Database* DatabaseRef;
00042
00043 extern OB::TypeCodeConst _tc_Database;
00044
00045 }
00046
00047 void OBDuplicate(HxCorba::DatabaseSession_ptr);
00048 void OBRelease(HxCorba::DatabaseSession_ptr);
00049
00050 void OBMarshal(HxCorba::DatabaseSession_ptr, OB::OutputStreamImpl*);
00051 void OBUnmarshal(HxCorba::DatabaseSession_ptr&, OB::InputStreamImpl*);
00052
00053 void OBDuplicate(HxCorba::Database_ptr);
00054 void OBRelease(HxCorba::Database_ptr);
00055
00056 void OBMarshal(HxCorba::Database_ptr, OB::OutputStreamImpl*);
00057 void OBUnmarshal(HxCorba::Database_ptr&, OB::InputStreamImpl*);
00058
00059 namespace HxCorba
00060 {
00061
00062 typedef OB::ObjVar< DatabaseSession > DatabaseSession_var;
00063 typedef OB::ObjOut< DatabaseSession > DatabaseSession_out;
00064
00065 typedef OB::ObjVar< Database > Database_var;
00066 typedef OB::ObjOut< Database > Database_out;
00067
00068 }
00069
00070 namespace OBStubImpl_HxCorba
00071 {
00072
00073 class DatabaseSession;
00074 typedef DatabaseSession* DatabaseSession_ptr;
00075
00076 class Database;
00077 typedef Database* Database_ptr;
00078
00079 }
00080
00081 void OBDuplicate(OBStubImpl_HxCorba::DatabaseSession_ptr);
00082 void OBRelease(OBStubImpl_HxCorba::DatabaseSession_ptr);
00083
00084 void OBDuplicate(OBStubImpl_HxCorba::Database_ptr);
00085 void OBRelease(OBStubImpl_HxCorba::Database_ptr);
00086
00087 namespace OBStubImpl_HxCorba
00088 {
00089
00090 typedef OB::ObjVar< DatabaseSession > DatabaseSession_var;
00091
00092 typedef OB::ObjVar< Database > Database_var;
00093
00094 }
00095
00096
00097
00098
00099 namespace HxCorba
00100 {
00101
00102
00103
00104
00105 struct DatabaseException : public CORBA::UserException
00106 {
00107 #ifdef OB_CLEAR_MEM
00108 DatabaseException();
00109 #else
00110 DatabaseException() { }
00111 #endif
00112 DatabaseException(const DatabaseException&);
00113 DatabaseException& operator=(const DatabaseException&);
00114
00115 static DatabaseException* _downcast(CORBA::Exception*);
00116 static const DatabaseException* _downcast(const CORBA::Exception*);
00117 virtual const char* _name() const;
00118 virtual void _raise() const { throw *this; }
00119 virtual const char* _rep_id() const;
00120 virtual char* _to_string() const;
00121
00122 virtual CORBA::Exception* _OB_clone() const;
00123 virtual void _OB_insertInAny(CORBA::Any&);
00124
00125 CORBA::Long dbCode;
00126 OB::StrForStruct dbMessage;
00127 OB::StrForStruct message;
00128
00129 DatabaseException(CORBA::Long,
00130 const char*,
00131 const char*);
00132
00133 virtual void _OB_marshal(OB::OutputStreamImpl*) const;
00134 static void _OB_unmarshal(DatabaseException&, OB::InputStreamImpl*);
00135 };
00136
00137 extern OB::TypeCodeConst _tc_DatabaseException;
00138
00139
00140
00141
00142 struct SegmentQueryResult;
00143 typedef OB::VarVar< SegmentQueryResult > SegmentQueryResult_var;
00144 typedef OB::VarOut< SegmentQueryResult > SegmentQueryResult_out;
00145
00146 struct SegmentQueryResult
00147 {
00148 #ifdef OB_CLEAR_MEM
00149 SegmentQueryResult();
00150 #else
00151 SegmentQueryResult() { }
00152 #endif
00153 SegmentQueryResult(const SegmentQueryResult&);
00154 SegmentQueryResult& operator=(const SegmentQueryResult&);
00155
00156 typedef SegmentQueryResult_var _var_type;
00157
00158 OB::StrForStruct videoName;
00159 OB::StrForStruct segmentationName;
00160 VxSegment_var segment;
00161 VxTimeSpan time;
00162
00163 void _OB_marshal(OB::OutputStreamImpl*) const;
00164 static void _OB_unmarshal(SegmentQueryResult&, OB::InputStreamImpl*);
00165 };
00166
00167 extern OB::TypeCodeConst _tc_SegmentQueryResult;
00168
00169
00170
00171
00172 class OBUnique_SegmentQueryResultSeq { };
00173
00174 typedef OB::VarSeq< SegmentQueryResult, OBUnique_SegmentQueryResultSeq > SegmentQueryResultSeq;
00175 typedef OB::SeqVar< OB::VarSeq< SegmentQueryResult, OBUnique_SegmentQueryResultSeq > > SegmentQueryResultSeq_var;
00176 typedef OB::SeqOut< OB::VarSeq< SegmentQueryResult, OBUnique_SegmentQueryResultSeq > > SegmentQueryResultSeq_out;
00177 extern OB::TypeCodeConst _tc_SegmentQueryResultSeq;
00178
00179 struct OBInfo_SegmentQueryResultSeq : public OB::ConstructedInfo
00180 {
00181 OBInfo_SegmentQueryResultSeq() { }
00182
00183 virtual void free(void* p) const
00184 {
00185 delete (SegmentQueryResultSeq*)p;
00186 }
00187
00188 virtual void* dup(const void* p) const
00189 {
00190 return new SegmentQueryResultSeq(*(const SegmentQueryResultSeq*)p);
00191 }
00192
00193 virtual void marshal(const void*, OB::OutputStreamImpl*) const;
00194 virtual void unmarshal(void*, OB::InputStreamImpl*) const;
00195 };
00196
00197
00198
00199
00200 class DatabaseSession : virtual public CORBA::Object
00201 {
00202 DatabaseSession(const DatabaseSession&);
00203 void operator=(const DatabaseSession&);
00204
00205 protected:
00206
00207 static const char* ids_[];
00208
00209 public:
00210
00211 DatabaseSession() { }
00212 virtual ~DatabaseSession() { }
00213
00214 typedef DatabaseSession_ptr _ptr_type;
00215 typedef DatabaseSession_var _var_type;
00216
00217 static inline DatabaseSession_ptr
00218 _duplicate(DatabaseSession_ptr p)
00219 {
00220 if(p)
00221 p -> _add_ref();
00222 return p;
00223 }
00224
00225 static inline DatabaseSession_ptr
00226 _nil()
00227 {
00228 return 0;
00229 }
00230
00231 static DatabaseSession_ptr _narrow(CORBA::Object_ptr);
00232 static DatabaseSession_ptr _unchecked_narrow(CORBA::Object_ptr);
00233
00234 static DatabaseSession_ptr _narrow(CORBA::AbstractBase_ptr);
00235 static DatabaseSession_ptr _unchecked_narrow(CORBA::AbstractBase_ptr);
00236
00237 static const char** _OB_staticIds();
00238
00239
00240
00241
00242 virtual StringSeq* listVideos() = 0;
00243
00244
00245
00246
00247 virtual StringSeq* listSegmentations(const char* videoName) = 0;
00248
00249
00250
00251
00252 virtual VxSegmentation_ptr getSegmentation(const char* videoName,
00253 const char* segName) = 0;
00254
00255
00256
00257
00258 virtual VxSegmentSeq* querySegments(const char* sqlQuery) = 0;
00259
00260
00261
00262
00263 virtual StringSeq* queryStrings(const char* sqlQuery) = 0;
00264
00265
00266
00267
00268 virtual SegmentQueryResultSeq* queryMultipleSegments(const char* sqlQuery) = 0;
00269
00270
00271
00272
00273 virtual void close() = 0;
00274 };
00275
00276
00277
00278
00279 class Database : virtual public CORBA::Object
00280 {
00281 Database(const Database&);
00282 void operator=(const Database&);
00283
00284 protected:
00285
00286 static const char* ids_[];
00287
00288 public:
00289
00290 Database() { }
00291 virtual ~Database() { }
00292
00293 typedef Database_ptr _ptr_type;
00294 typedef Database_var _var_type;
00295
00296 static inline Database_ptr
00297 _duplicate(Database_ptr p)
00298 {
00299 if(p)
00300 p -> _add_ref();
00301 return p;
00302 }
00303
00304 static inline Database_ptr
00305 _nil()
00306 {
00307 return 0;
00308 }
00309
00310 static Database_ptr _narrow(CORBA::Object_ptr);
00311 static Database_ptr _unchecked_narrow(CORBA::Object_ptr);
00312
00313 static Database_ptr _narrow(CORBA::AbstractBase_ptr);
00314 static Database_ptr _unchecked_narrow(CORBA::AbstractBase_ptr);
00315
00316 static const char** _OB_staticIds();
00317
00318
00319
00320
00321 virtual DatabaseSession_ptr openSession(const char* username,
00322 const char* password) = 0;
00323 };
00324
00325 }
00326
00327
00328
00329
00330 namespace OBProxy_HxCorba
00331 {
00332
00333
00334
00335
00336 class DatabaseSession : virtual public ::HxCorba::DatabaseSession,
00337 virtual public OBCORBA::Object
00338 {
00339 DatabaseSession(const DatabaseSession&);
00340 void operator=(const DatabaseSession&);
00341
00342 protected:
00343
00344 virtual OB::MarshalStubImpl_ptr _OB_createMarshalStubImpl();
00345
00346 public:
00347
00348 DatabaseSession() { }
00349 virtual ~DatabaseSession() { }
00350
00351 virtual const char** _OB_ids() const;
00352
00353
00354
00355
00356 ::HxCorba::StringSeq* listVideos();
00357
00358
00359
00360
00361 ::HxCorba::StringSeq* listSegmentations(const char* videoName);
00362
00363
00364
00365
00366 ::HxCorba::VxSegmentation_ptr getSegmentation(const char* videoName,
00367 const char* segName);
00368
00369
00370
00371
00372 ::HxCorba::VxSegmentSeq* querySegments(const char* sqlQuery);
00373
00374
00375
00376
00377 ::HxCorba::StringSeq* queryStrings(const char* sqlQuery);
00378
00379
00380
00381
00382 ::HxCorba::SegmentQueryResultSeq* queryMultipleSegments(const char* sqlQuery);
00383
00384
00385
00386
00387 void close();
00388 };
00389
00390
00391
00392
00393 class Database : virtual public ::HxCorba::Database,
00394 virtual public OBCORBA::Object
00395 {
00396 Database(const Database&);
00397 void operator=(const Database&);
00398
00399 protected:
00400
00401 virtual OB::MarshalStubImpl_ptr _OB_createMarshalStubImpl();
00402
00403 public:
00404
00405 Database() { }
00406 virtual ~Database() { }
00407
00408 virtual const char** _OB_ids() const;
00409
00410
00411
00412
00413 ::HxCorba::DatabaseSession_ptr openSession(const char* username,
00414 const char* password);
00415 };
00416
00417 }
00418
00419
00420
00421
00422 namespace OBStubImpl_HxCorba
00423 {
00424
00425
00426
00427
00428 class DatabaseSession : virtual public OB::StubImplBase
00429 {
00430 DatabaseSession(const DatabaseSession&);
00431 void operator=(const DatabaseSession&);
00432
00433 protected:
00434
00435 DatabaseSession() { }
00436
00437 public:
00438
00439 static inline DatabaseSession_ptr
00440 _duplicate(DatabaseSession_ptr p)
00441 {
00442 if(p)
00443 p -> _OB_incRef();
00444 return p;
00445 }
00446
00447 static inline DatabaseSession_ptr
00448 _nil()
00449 {
00450 return 0;
00451 }
00452
00453
00454
00455
00456 virtual ::HxCorba::StringSeq* listVideos() = 0;
00457
00458
00459
00460
00461 virtual ::HxCorba::StringSeq* listSegmentations(const char* videoName) = 0;
00462
00463
00464
00465
00466 virtual ::HxCorba::VxSegmentation_ptr getSegmentation(const char* videoName,
00467 const char* segName) = 0;
00468
00469
00470
00471
00472 virtual ::HxCorba::VxSegmentSeq* querySegments(const char* sqlQuery) = 0;
00473
00474
00475
00476
00477 virtual ::HxCorba::StringSeq* queryStrings(const char* sqlQuery) = 0;
00478
00479
00480
00481
00482 virtual ::HxCorba::SegmentQueryResultSeq* queryMultipleSegments(const char* sqlQuery) = 0;
00483
00484
00485
00486
00487 virtual void close() = 0;
00488 };
00489
00490
00491
00492
00493 class Database : virtual public OB::StubImplBase
00494 {
00495 Database(const Database&);
00496 void operator=(const Database&);
00497
00498 protected:
00499
00500 Database() { }
00501
00502 public:
00503
00504 static inline Database_ptr
00505 _duplicate(Database_ptr p)
00506 {
00507 if(p)
00508 p -> _OB_incRef();
00509 return p;
00510 }
00511
00512 static inline Database_ptr
00513 _nil()
00514 {
00515 return 0;
00516 }
00517
00518
00519
00520
00521 virtual ::HxCorba::DatabaseSession_ptr openSession(const char* username,
00522 const char* password) = 0;
00523 };
00524
00525 }
00526
00527
00528
00529
00530 namespace OBMarshalStubImpl_HxCorba
00531 {
00532
00533
00534
00535
00536 class DatabaseSession : virtual public OBStubImpl_HxCorba::DatabaseSession,
00537 virtual public OB::MarshalStubImpl
00538 {
00539 DatabaseSession(const DatabaseSession&);
00540 void operator=(const DatabaseSession&);
00541
00542 protected:
00543
00544 DatabaseSession() { }
00545 friend class OBProxy_HxCorba::DatabaseSession;
00546
00547 public:
00548
00549
00550
00551
00552 virtual ::HxCorba::StringSeq* listVideos();
00553
00554
00555
00556
00557 virtual ::HxCorba::StringSeq* listSegmentations(const char* videoName);
00558
00559
00560
00561
00562 virtual ::HxCorba::VxSegmentation_ptr getSegmentation(const char* videoName,
00563 const char* segName);
00564
00565
00566
00567
00568 virtual ::HxCorba::VxSegmentSeq* querySegments(const char* sqlQuery);
00569
00570
00571
00572
00573 virtual ::HxCorba::StringSeq* queryStrings(const char* sqlQuery);
00574
00575
00576
00577
00578 virtual ::HxCorba::SegmentQueryResultSeq* queryMultipleSegments(const char* sqlQuery);
00579
00580
00581
00582
00583 virtual void close();
00584 };
00585
00586
00587
00588
00589 class Database : virtual public OBStubImpl_HxCorba::Database,
00590 virtual public OB::MarshalStubImpl
00591 {
00592 Database(const Database&);
00593 void operator=(const Database&);
00594
00595 protected:
00596
00597 Database() { }
00598 friend class OBProxy_HxCorba::Database;
00599
00600 public:
00601
00602
00603
00604
00605 virtual ::HxCorba::DatabaseSession_ptr openSession(const char* username,
00606 const char* password);
00607 };
00608
00609 }
00610
00611
00612
00613
00614 namespace OBV_HxCorba
00615 {
00616
00617 }
00618
00619
00620
00621
00622 void operator<<=(CORBA::Any&, HxCorba::DatabaseException*);
00623 void operator<<=(CORBA::Any&, const HxCorba::DatabaseException&);
00624 CORBA::Boolean operator>>=(const CORBA::Any&, const HxCorba::DatabaseException*&);
00625
00626 inline void
00627 operator<<=(CORBA::Any_var& any, HxCorba::DatabaseException* val)
00628 {
00629 any.inout() <<= val;
00630 }
00631
00632 inline void
00633 operator<<=(CORBA::Any_var& any, const HxCorba::DatabaseException& val)
00634 {
00635 any.inout() <<= val;
00636 }
00637
00638 inline CORBA::Boolean
00639 operator>>=(const CORBA::Any_var& any, const HxCorba::DatabaseException*& val)
00640 {
00641 return any.in() >>= val;
00642 }
00643
00644
00645
00646
00647 void operator<<=(CORBA::Any&, HxCorba::SegmentQueryResult*);
00648 void operator<<=(CORBA::Any&, const HxCorba::SegmentQueryResult&);
00649 CORBA::Boolean operator>>=(const CORBA::Any&, const HxCorba::SegmentQueryResult*&);
00650
00651 inline void
00652 operator<<=(CORBA::Any_var& any, HxCorba::SegmentQueryResult* val)
00653 {
00654 any.inout() <<= val;
00655 }
00656
00657 inline void
00658 operator<<=(CORBA::Any_var& any, const HxCorba::SegmentQueryResult& val)
00659 {
00660 any.inout() <<= val;
00661 }
00662
00663 inline CORBA::Boolean
00664 operator>>=(const CORBA::Any_var& any, const HxCorba::SegmentQueryResult*& val)
00665 {
00666 return any.in() >>= val;
00667 }
00668
00669
00670
00671
00672 void operator<<=(CORBA::Any&, HxCorba::SegmentQueryResultSeq*);
00673 void operator<<=(CORBA::Any&, const HxCorba::SegmentQueryResultSeq&);
00674 CORBA::Boolean operator>>=(const CORBA::Any&, const HxCorba::SegmentQueryResultSeq*&);
00675
00676 inline void
00677 operator<<=(CORBA::Any_var& any, HxCorba::SegmentQueryResultSeq* val)
00678 {
00679 any.inout() <<= val;
00680 }
00681
00682 inline void
00683 operator<<=(CORBA::Any_var& any, const HxCorba::SegmentQueryResultSeq& val)
00684 {
00685 any.inout() <<= val;
00686 }
00687
00688 inline CORBA::Boolean
00689 operator>>=(const CORBA::Any_var& any, const HxCorba::SegmentQueryResultSeq*& val)
00690 {
00691 return any.in() >>= val;
00692 }
00693
00694
00695
00696
00697 namespace CORBA
00698 {
00699
00700 inline void
00701 release(::HxCorba::DatabaseSession_ptr p)
00702 {
00703 if(p)
00704 p -> _remove_ref();
00705 }
00706
00707 inline Boolean
00708 is_nil(::HxCorba::DatabaseSession_ptr p)
00709 {
00710 return p == 0;
00711 }
00712
00713 inline void
00714 release(OBStubImpl_HxCorba::DatabaseSession_ptr p)
00715 {
00716 if(p)
00717 p -> _OB_decRef();
00718 }
00719
00720 inline Boolean
00721 is_nil(OBStubImpl_HxCorba::DatabaseSession_ptr p)
00722 {
00723 return p == 0;
00724 }
00725
00726 }
00727
00728 void operator<<=(CORBA::Any&, HxCorba::DatabaseSession_ptr*);
00729 void operator<<=(CORBA::Any&, HxCorba::DatabaseSession_ptr);
00730 CORBA::Boolean operator>>=(const CORBA::Any&, HxCorba::DatabaseSession_ptr&);
00731
00732 inline void
00733 operator<<=(CORBA::Any_var& any, HxCorba::DatabaseSession_ptr* val)
00734 {
00735 any.inout() <<= val;
00736 }
00737
00738 inline void
00739 operator<<=(CORBA::Any_var& any, HxCorba::DatabaseSession_ptr val)
00740 {
00741 any.inout() <<= val;
00742 }
00743
00744 inline CORBA::Boolean
00745 operator>>=(const CORBA::Any_var& any, HxCorba::DatabaseSession_ptr& val)
00746 {
00747 return any.in() >>= val;
00748 }
00749
00750
00751
00752
00753 namespace CORBA
00754 {
00755
00756 inline void
00757 release(::HxCorba::Database_ptr p)
00758 {
00759 if(p)
00760 p -> _remove_ref();
00761 }
00762
00763 inline Boolean
00764 is_nil(::HxCorba::Database_ptr p)
00765 {
00766 return p == 0;
00767 }
00768
00769 inline void
00770 release(OBStubImpl_HxCorba::Database_ptr p)
00771 {
00772 if(p)
00773 p -> _OB_decRef();
00774 }
00775
00776 inline Boolean
00777 is_nil(OBStubImpl_HxCorba::Database_ptr p)
00778 {
00779 return p == 0;
00780 }
00781
00782 }
00783
00784 void operator<<=(CORBA::Any&, HxCorba::Database_ptr*);
00785 void operator<<=(CORBA::Any&, HxCorba::Database_ptr);
00786 CORBA::Boolean operator>>=(const CORBA::Any&, HxCorba::Database_ptr&);
00787
00788 inline void
00789 operator<<=(CORBA::Any_var& any, HxCorba::Database_ptr* val)
00790 {
00791 any.inout() <<= val;
00792 }
00793
00794 inline void
00795 operator<<=(CORBA::Any_var& any, HxCorba::Database_ptr val)
00796 {
00797 any.inout() <<= val;
00798 }
00799
00800 inline CORBA::Boolean
00801 operator>>=(const CORBA::Any_var& any, HxCorba::Database_ptr& val)
00802 {
00803 return any.in() >>= val;
00804 }
00805
00806 #endif