Bug 2910

Summary: Compression update
Product: TAO Reporter: Johnny Willemsen <jwillemsen>
Component: ORBAssignee: Johnny Willemsen <jwillemsen>
Status: RESOLVED FIXED    
Severity: minor    
Priority: P3    
Version: 1.5.7   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 2623    

Description Johnny Willemsen 2007-04-24 01:29:11 CDT
> * Shouldn't the compression IDs be defined in the IDL as constants?
>   Having the user perform calls with "magic numbers" like
>   "manager->get_compressor(4)" seems ugly.  I think it's clearer to
>   use symbolic constants like so
>   "manager->get_compressor(Compression::zlib)".  OMG Codec formats are
>   defined in this manner, for example:
> 
>   module IOP {
>   ...
>     typedef short EncodingFormat;
>     const EncodingFormat ENCODING_CDR_ENCAPS = 0;
>   ...
>     struct Encoding {
>       EncodingFormat format;
>       octet major_version;
>       octet minor_version;
>     };
>   ...
>     Codec create_codec (in Encoding enc) raises (UnknownEncoding);
>   ...
>  };
Comment 1 Johnny Willemsen 2007-04-24 07:08:21 CDT
Tue Apr 24 12:06:12 UTC 2007  Johnny Willemsen  <jwillemsen@remedy.nl>

        * tao/Compression/Compression.pidl:
        * tao/Compression/zlib/ZlibCompressor_Factory.cpp:
        * tests/Compression/server.cpp:
          Made the CompressorId an unsigned short and define constants
          for the predefined compressor ids. Thanks to Ossama for proposing
          this change. This fixed bugzilla bug 2910.
Comment 2 Johnny Willemsen 2008-06-20 13:14:00 CDT
changed the compressorid to unsigned long,