import {Ice} from 'ice'; import '../Ice/BuiltinSequences'; declare module './Ice.ns' { namespace Ice { /** * A simple collection of properties, represented as a dictionary of * key/value pairs. Both key and value are strings. * * @see Properties#getPropertiesForPrefix */ type PropertyDict = Map; const PropertyDict: { /** * A simple collection of properties, represented as a dictionary of * key/value pairs. Both key and value are strings. * * @see Properties#getPropertiesForPrefix */ new (entries?: ReadonlyArray<[string, string]>): PropertyDict; }; /** * The PropertiesAdmin interface provides remote access to the properties * of a communicator. */ abstract class PropertiesAdmin extends Ice.Object { /** * Get a property by key. If the property is not set, an empty * string is returned. * * @param key The property key. * * @return The property value. */ abstract getProperty( key: string, current: Ice.Current, ): Ice.OperationResult; /** * Get all properties whose keys begin with prefix. If * prefix is an empty string then all properties are returned. * * @param prefix The prefix to search for (empty string if none). * @return The matching property set. */ abstract getPropertiesForPrefix( prefix: string, current: Ice.Current, ): Ice.OperationResult; /** * Update the communicator's properties with the given property set. * * @param newProperties Properties to be added, changed, or removed. * If an entry in newProperties matches the name of an existing property, * that property's value is replaced with the new value. If the new value * is an empty string, the property is removed. Any existing properties * that are not modified or removed by the entries in newProperties are * retained with their original values. */ abstract setProperties( newProperties: PropertyDict, current: Ice.Current, ): Ice.OperationResult; } /** * The PropertiesAdmin interface provides remote access to the properties * of a communicator. */ class PropertiesAdminPrx extends Ice.ObjectPrx { /** * Get a property by key. If the property is not set, an empty * string is returned. * * @param key The property key. * * @return The property value. */ getProperty(key: string, ctx?: Ice.Context): Ice.AsyncResult; /** * Get all properties whose keys begin with prefix. If * prefix is an empty string then all properties are returned. * * @param prefix The prefix to search for (empty string if none). * @return The matching property set. */ getPropertiesForPrefix( prefix: string, ctx?: Ice.Context, ): Ice.AsyncResult; /** * Update the communicator's properties with the given property set. * * @param newProperties Properties to be added, changed, or removed. * If an entry in newProperties matches the name of an existing property, * that property's value is replaced with the new value. If the new value * is an empty string, the property is removed. Any existing properties * that are not modified or removed by the entries in newProperties are * retained with their original values. */ setProperties( newProperties: PropertyDict, ctx?: Ice.Context, ): Ice.AsyncResult; } } } export {Ice} from './Ice.ns';