1 // -*- Mode: C++; -*- 2 // Package : omniORB 3 // omniZIOP.cc Created on: 2012/10/02 4 // Author : Duncan Grisby (dgrisby) 5 // 6 // Copyright (C) 2012 Apasphere Ltd. 7 // 8 // This file is part of the omniORB library 9 // 10 // The omniORB library is free software; you can redistribute it and/or 11 // modify it under the terms of the GNU Lesser General Public 12 // License as published by the Free Software Foundation; either 13 // version 2.1 of the License, or (at your option) any later version. 14 // 15 // This library is distributed in the hope that it will be useful, 16 // but WITHOUT ANY WARRANTY; without even the implied warranty of 17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 18 // Lesser General Public License for more details. 19 // 20 // You should have received a copy of the GNU Lesser General Public 21 // License along with this library. If not, see http://www.gnu.org/licenses/ 22 // 23 // Description: 24 // ZIOP support 25 26 #ifndef _omniZIOP_h_ 27 #define _omniZIOP_h_ 28 29 #include <omniORB4/CORBA.h> 30 #include <omniORB4/ziopStubs.h> 31 32 33 // 34 // Proprietary omniZIOP module 35 // 36 37 _CORBA_MODULE omniZIOP 38 _CORBA_MODULE_BEG 39 40 // 41 // Policy creation functions 42 // 43 // These are equivalent to using orb->create_policy(), but do not 44 // require use of Any. 45 46 ZIOP::CompressionEnablingPolicy_ptr 47 create_compression_enabling_policy(CORBA::Boolean compression_enabled); 48 49 ZIOP::CompressionIdLevelListPolicy_ptr 50 create_compression_id_level_list_policy(const Compression::CompressorIdLevelList& compressor_ids); 51 52 ZIOP::CompressionLowValuePolicy_ptr 53 create_compression_low_value_policy(CORBA::ULong low_value); 54 55 ZIOP::CompressionMinRatioPolicy_ptr 56 create_compression_min_ratio_policy(Compression::CompressionRatio ratio); 57 58 59 // 60 // Global policies 61 62 void 63 setGlobalPolicies(const CORBA::PolicyList& policies); 64 // Sets global policies that apply to all POAs and all object 65 // references, equivalent to separately setting the policies in 66 // calls to the POAs and calling _set_policy_overrides() on all 67 // object references. 68 // 69 // There is no need to include a CompressionEnablingPolicy with 70 // value true, since calling this implicitly enables compression. 71 // If other policies are not set, default values are used, so to 72 // enable ZIOP with default settings, simply call setGlobalPolicies 73 // with empty policies. 74 75 CORBA::Object_ptr 76 setServerPolicies(CORBA::Object_ptr obj, const CORBA::PolicyList& policies); 77 // Returns a new object reference equivalent to obj, but with 78 // specified compression policies, as if the server-side ORB had set 79 // those policies. This is useful to enable ZIOP for an object 80 // reference constructed from a corbaloc URI. 81 // 82 // ZIOP is only valid for GIOP 1.2 (and later), so the object 83 // reference must be GIOP 1.2. For a corbaloc URI, specify it as 84 // 85 // corbaloc::1.2@some.host.name/key 86 // 87 // Beware that this may cause the client to make ZIOP calls to a 88 // server that does not support ZIOP! 89 90 91 _CORBA_MODULE_END 92 93 #undef _ziop_attr 94 95 #endif // _omniZIOP_h_ 96