[libRETS-users] SetQueryType() and SetFormatType() unavailable in C# deployment?

Keith T. Garner kgarner at crt.realtors.org
Fri Feb 9 15:03:09 CST 2007


Bill Linker wrote:
> I do not see SetQueryType() and SetFormatType() as available member
> methods of the SearchRequest object in C#. Is this a known issue

It is now.  The way we use swig to map Objects and Methods to various
languages is a bit of a manual process.  We just simple hadn't gotten around
to mapping those methods yet.

Basically, we're working a bit on an as-needed option on those mappings.  No
one has needed them to date, so they weren't added.  I'll start adding those
today and will hopefully have a release out on Monday or Tuesday that has
those added.

Are there any other missing methods that should be mapped that you know of?

> or is something else wrong with my setup?

Nope, you're probably fine.

> It appears that SetQueryType is set
> to DMQL2 in CreateSearchRequest() if the target system is RETS 1.5.

Yep, by the RETS spec, you should be using DMQL2 if you're using RETS1.5.
I'm not sure why you can switch it, but you can.

> Even
> though the metadata of the target system indicates that it is RETS 1.5,
> our working searches in our old RETS system (not librets) appear to be
> using DMQL:
> 
> “(host-removed):6103/rets/search?SearchType=Property&Class=DE&Limit=NONE&Query=(LP=10000-130000),(STD=2007-01-02T20:00:06%2B),(ST=CLSD)&*QueryType=DMQL*&Format=COMPACT-DECODED&Select=AIR,AMN,AR,ASF,BAS,BAT,BLT,BMT,BR,BTH,CC,CIT,CLOSED_DATE,…(select
> list abbreviated)”

Yep, that is the case.

> I see in the C++ source files that this are supposed to be public
> members (also in the HTML documentation in the
> classlibrets_1_1_search_request.html file)?

Yep, it just hasn't been mapped across the language void yet.

> Also, does someone have a link to info (or download) for the Boost
> library for C++ and C# interoperability?

You mean like http://boost.org/ ?  :)  I hate it when something like that is
hidden in plain sight.  Consequently, its also the first hit on a google
search of "boost library".

As for c# interoperability with Boost, boost has NOTHING to do with C#.  Its
a utility library for C++ that we're making heavy use of.  It doesn't exist
outside of C++ and you shouldn't need to care about Boost at all in C#,
except for the occasional exceptions that are bubbling all the way up.
Those are most likely bugs in the libRETS code that we need to fix.  None of
the interfaces used in C# are related to boost, we took care to keep the
interface for the other languages boost free, its just used internally.

When talking interoperability, you might actually be thinking about swig.
which is at http://www.swig.org/  Swig is what generates the mappings
between C++ and .NET (and Ruby and Python) for us.  Swig is part voodoo, but
it gets the job done.

Keith


-- 
  Keith T. Garner - Managing Director - Center for REALTOR® Technology
   kgarner at realtors.org - 312-329-3294 - http://blog.realtors.org/crt




More information about the libRETS-users mailing list