-
Notifications
You must be signed in to change notification settings - Fork 4
Add .ice files equivalent to the mode=Slice1 Slice files #29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| // Copyright (c) ZeroC, Inc. | ||
|
|
||
| #pragma once | ||
|
|
||
| [["cpp:dll-export:ICE_API"]] | ||
| [["cpp:doxygen:include:Ice/Ice.h"]] | ||
| [["cpp:header-ext:h"]] | ||
|
|
||
| [["cpp:no-default-include"]] | ||
| [["cpp:include:Ice/Config.h"]] | ||
| [["cpp:include:Ice/ObjectF.h"]] | ||
| [["cpp:include:Ice/ProxyF.h"]] | ||
| [["cpp:include:Ice/ValueF.h"]] | ||
| [["cpp:include:cstdint"]] | ||
| [["cpp:include:optional"]] | ||
| [["cpp:include:string"]] | ||
| [["cpp:include:vector"]] | ||
|
|
||
| [["js:module:@zeroc/ice"]] | ||
|
|
||
| #ifdef __ICERPC__ | ||
| ["cs:identifier:IceRpc.Slice.Ice"] | ||
| #endif | ||
| ["java:identifier:com.zeroc.Ice"] | ||
| module Ice | ||
| { | ||
| /// A sequence of bools. | ||
| sequence<bool> BoolSeq; | ||
|
|
||
| /// A sequence of bytes. | ||
| sequence<byte> ByteSeq; | ||
|
|
||
| /// A sequence of shorts. | ||
| sequence<short> ShortSeq; | ||
|
|
||
| /// A sequence of ints. | ||
| sequence<int> IntSeq; | ||
|
|
||
| /// A sequence of longs. | ||
| sequence<long> LongSeq; | ||
|
|
||
| /// A sequence of floats. | ||
| sequence<float> FloatSeq; | ||
|
|
||
| /// A sequence of doubles. | ||
| sequence<double> DoubleSeq; | ||
|
|
||
| /// A sequence of strings. | ||
| sequence<string> StringSeq; | ||
|
|
||
| /// A sequence of class instances. | ||
| ["deprecated:Define your own sequence instead and avoid using the term `object` to designate a class instance."] | ||
| sequence<Value> ObjectSeq; | ||
|
|
||
| /// A sequence of object proxies. | ||
| sequence<Object*> ObjectProxySeq; | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| // Copyright (c) ZeroC, Inc. | ||
|
|
||
| #pragma once | ||
|
|
||
| [["cpp:dll-export:ICE_API"]] | ||
| [["cpp:doxygen:include:Ice/Ice.h"]] | ||
| [["cpp:header-ext:h"]] | ||
|
|
||
| [["cpp:no-default-include"]] | ||
| [["cpp:include:Ice/Config.h"]] | ||
| [["cpp:include:Ice/StreamHelpers.h"]] | ||
| [["cpp:include:Ice/TupleCompare.h"]] | ||
| [["cpp:include:string"]] | ||
| [["cpp:include:vector"]] | ||
|
|
||
| [["js:module:@zeroc/ice"]] | ||
|
|
||
| /// The Ice RPC framework. | ||
| #ifdef __ICERPC__ | ||
| ["cs:identifier:IceRpc.Slice.Ice"] | ||
| #endif | ||
| ["java:identifier:com.zeroc.Ice"] | ||
| module Ice | ||
| { | ||
| /// Represents the identity of an Ice object. It is comparable to the path of a URI. Its string representation is | ||
| /// `name` when the category is empty, and `category/name` when the category is not empty. | ||
| ["cpp:custom-print"] | ||
| struct Identity | ||
| { | ||
| /// The name of the Ice object. An empty name is not valid. | ||
| string name; | ||
|
|
||
| /// The category of the object. | ||
| string category = ""; | ||
| } | ||
|
|
||
| /// A sequence of identities. | ||
| sequence<Identity> IdentitySeq; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,77 @@ | ||
| // Copyright (c) ZeroC, Inc. | ||
|
|
||
| #pragma once | ||
|
|
||
| [["cpp:dll-export:ICE_API"]] | ||
| [["cpp:doxygen:include:Ice/Ice.h"]] | ||
| [["cpp:header-ext:h"]] | ||
|
|
||
| [["cpp:source-include:Ice/LocatorRegistry.h"]] | ||
|
|
||
| [["js:module:@zeroc/ice"]] | ||
|
|
||
| #include "Identity.ice" | ||
|
|
||
| #ifdef __ICERPC__ | ||
| ["cs:identifier:IceRpc.Slice.Ice"] | ||
| #endif | ||
| ["java:identifier:com.zeroc.Ice"] | ||
| module Ice | ||
| { | ||
| /// The exception that is thrown by a {@link Locator} implementation when it cannot find an object adapter with the | ||
| /// provided adapter ID. | ||
| exception AdapterNotFoundException | ||
| { | ||
| } | ||
|
|
||
| /// The exception that is thrown by a {@link Locator} implementation when it cannot find an object with the provided | ||
| /// identity. | ||
| exception ObjectNotFoundException | ||
| { | ||
| } | ||
|
|
||
| interface LocatorRegistry; | ||
|
|
||
| /// Client applications use the Locator object to resolve Ice indirect proxies. This object also allows | ||
| /// server applications to retrieve a proxy to the associated {@link LocatorRegistry} object where they can register | ||
| /// their object adapters. | ||
| interface Locator | ||
| { | ||
| /// Finds an object by identity and returns a dummy proxy with the endpoint(s) that can be used to reach this | ||
| /// object. This dummy proxy may be an indirect proxy that requires further resolution using | ||
| /// {@link findAdapterById}. | ||
| /// @param id The identity. | ||
| /// @return A dummy proxy, or null if an object with the requested identity was not found. | ||
| /// @throws ObjectNotFoundException Thrown when an object with the requested identity was not found. The caller | ||
| /// should treat this exception like a null return value. | ||
| ["cpp:const"] | ||
| idempotent Object* findObjectById(Identity id) | ||
| throws ObjectNotFoundException; | ||
|
|
||
| /// Finds an object adapter by adapter ID and returns a dummy proxy with the object adapter's endpoint(s). | ||
| /// @param id The adapter ID. | ||
| /// @return A dummy proxy with the adapter's endpoints, or null if an object adapter with @p id was not found. | ||
| /// @throws AdapterNotFoundException Thrown when an object adapter with this adapter ID was not found. The | ||
| /// caller should treat this exception like a null return value. | ||
| ["cpp:const"] | ||
| idempotent Object* findAdapterById(string id) | ||
| throws AdapterNotFoundException; | ||
|
Comment on lines
+35
to
+58
|
||
|
|
||
| /// Gets a proxy to the locator registry. | ||
| /// @return A proxy to the locator registry, or null if this locator has no associated registry. | ||
| ["cpp:const"] | ||
| idempotent LocatorRegistry* getRegistry(); | ||
| } | ||
|
|
||
| /// Provides access to a {@link Locator} object via a fixed identity. | ||
| /// A LocatorFinder is always registered with identity `Ice/LocatorFinder`. This allows clients to obtain the | ||
| /// associated Locator proxy with just the endpoint information of the object. For example, you can use the | ||
| /// LocatorFinder proxy `Ice/LocatorFinder:tcp -h somehost -p 4061` to get the Locator proxy | ||
| /// `MyIceGrid/Locator:tcp -h somehost -p 4061`. | ||
| interface LocatorFinder | ||
| { | ||
| /// Gets a proxy to the associated {@link Locator}. The proxy might point to several replicas. | ||
| /// @return The locator proxy. This proxy is never null. | ||
| Locator* getLocator(); | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,80 @@ | ||
| // Copyright (c) ZeroC, Inc. | ||
|
|
||
| #pragma once | ||
|
|
||
| [["cpp:dll-export:ICE_API"]] | ||
| [["cpp:doxygen:include:Ice/Ice.h"]] | ||
| [["cpp:header-ext:h"]] | ||
|
|
||
| [["cpp:source-include:Ice/Process.h"]] | ||
|
|
||
| [["js:module:@zeroc/ice"]] | ||
|
|
||
| #include "Locator.ice" | ||
|
|
||
| #ifdef __ICERPC__ | ||
| ["cs:identifier:IceRpc.Slice.Ice"] | ||
| #endif | ||
| ["java:identifier:com.zeroc.Ice"] | ||
| module Ice | ||
| { | ||
| interface Process; | ||
|
|
||
| /// The exception that is thrown when a server application tries to register endpoints for an object adapter that is | ||
| /// already active. | ||
| exception AdapterAlreadyActiveException | ||
| { | ||
| } | ||
|
|
||
| /// The exception that is thrown when the provided replica group is invalid. | ||
| exception InvalidReplicaGroupIdException | ||
| { | ||
| } | ||
|
|
||
| /// The exception that is thrown when a server was not found. | ||
| exception ServerNotFoundException | ||
| { | ||
| } | ||
|
|
||
| /// A server application registers the endpoints of its indirect object adapters with the LocatorRegistry object. | ||
| interface LocatorRegistry | ||
| { | ||
| /// Registers or unregisters the endpoints of an object adapter. | ||
| /// @param id The adapter ID. | ||
| /// @param proxy A dummy proxy created by the object adapter. @p proxy carries the object adapter's endpoints. | ||
| /// The locator considers an object adapter to be active after it has registered its endpoints. | ||
| /// When @p proxy is null, the endpoints are unregistered and the locator considers the object adapter inactive. | ||
| /// @throws AdapterNotFoundException Thrown when the locator only allows registered object adapters to register | ||
| /// their endpoints and no object adapter with this adapter ID was registered with the locator. | ||
| /// @throws AdapterAlreadyActiveException Thrown when an object adapter with the same adapter ID has already | ||
| /// registered its endpoints. Since this operation is marked idempotent, this exception may be thrown when the | ||
| /// Ice client runtime retries an invocation with a non-null @p proxy. | ||
| idempotent void setAdapterDirectProxy(string id, Object* proxy) | ||
| throws AdapterNotFoundException, AdapterAlreadyActiveException; | ||
|
|
||
| /// Registers or unregisters the endpoints of an object adapter. This object adapter is a member of a replica | ||
| /// group. | ||
| /// @param adapterId The adapter ID. | ||
| /// @param replicaGroupId The replica group ID. | ||
| /// @param proxy A dummy proxy created by the object adapter. @p proxy carries the object adapter's endpoints. | ||
| /// The locator considers an object adapter to be active after it has registered its endpoints. When @p proxy is | ||
| /// null, the endpoints are unregistered and the locator considers the object adapter inactive. | ||
| /// @throws AdapterNotFoundException Thrown when the locator only allows registered object adapters to register | ||
| /// their endpoints and no object adapter with this adapter ID was registered with the locator. | ||
| /// @throws AdapterAlreadyActiveException Thrown when an object adapter with the same adapter ID has already | ||
| /// registered its endpoints. Since this operation is marked idempotent, this exception may be thrown when the | ||
| /// Ice client runtime retries an invocation with a non-null @p proxy. | ||
| /// @throws InvalidReplicaGroupIdException Thrown when the given replica group does not match the replica group | ||
| /// associated with the adapter ID in the locator's database. | ||
| idempotent void setReplicatedAdapterDirectProxy(string adapterId, string replicaGroupId, Object* proxy) | ||
| throws AdapterNotFoundException, AdapterAlreadyActiveException, InvalidReplicaGroupIdException; | ||
|
|
||
| /// Registers a proxy to the {@link Process} object of a server application. | ||
| /// @param id The server ID. | ||
| /// @param proxy A proxy to the {@link Process} object of the server. This proxy is never null. | ||
| /// @throws ServerNotFoundException Thrown when the locator does not know a server application with a server ID | ||
| /// of @p id. | ||
| idempotent void setServerProcessProxy(string id, Process* proxy) | ||
| throws ServerNotFoundException; | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,26 @@ | ||||||||||||||||||||||||||||||||||||||||
| // Copyright (c) ZeroC, Inc. | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| #pragma once | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| #include "BuiltinSequences.ice" | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| ["cs:identifier:IceRpc.Slice.Ice"] | ||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+6
to
+7
|
||||||||||||||||||||||||||||||||||||||||
| ["cs:identifier:IceRpc.Slice.Ice"] | |
| #ifdef __ICERPC__ | |
| ["cs:identifier:IceRpc.Slice.Ice"] | |
| #endif |
Copilot
AI
Feb 28, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ice/Object.ice is missing several file/module-level directives that are present in the other Ice/*.ice files in this PR (e.g., [["cpp:dll-export:ICE_API"]], [["js:module:@zeroc/ice"]], "java:identifier:com.zeroc.Ice", and the #ifdef __ICERPC__ guard around the C# identifier). If this file is meant to be compiled alongside the rest of the Ice .ice definitions, please add the same directives/guards for consistency and to avoid generating a different API surface for Object than for the rest of the Ice module.
| ["cs:identifier:IceRpc.Slice.Ice"] | |
| module Ice | |
| { | |
| /// Represents the implicit base interface of all Slice interfaces. | |
| ["cs:identifier:IceObject"] | |
| ["cpp:dll-export:ICE_API"] | |
| ["js:module:@zeroc/ice"] | |
| ["java:identifier:com.zeroc.Ice"] | |
| #ifdef __ICERPC__ | |
| ["cs:identifier:IceRpc.Slice.Ice"] | |
| #endif | |
| module Ice | |
| { | |
| /// Represents the implicit base interface of all Slice interfaces. | |
| #ifdef __ICERPC__ | |
| ["cs:identifier:IceObject"] | |
| #endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This interface is specific to IceRPC (not copied from zeroc-ice/ice).
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| // Copyright (c) ZeroC, Inc. | ||
|
|
||
| #pragma once | ||
|
|
||
| [["cpp:dll-export:ICE_API"]] | ||
| [["cpp:doxygen:include:Ice/Ice.h"]] | ||
| [["cpp:header-ext:h"]] | ||
|
|
||
| [["js:module:@zeroc/ice"]] | ||
|
|
||
| #include "LocatorRegistry.ice" | ||
|
|
||
| #ifdef __ICERPC__ | ||
| ["cs:identifier:IceRpc.Slice.Ice"] | ||
| #endif | ||
| ["java:identifier:com.zeroc.Ice"] | ||
| module Ice | ||
| { | ||
| /// A server application managed by a locator implementation such as IceGrid hosts a Process object and registers a | ||
| /// proxy to this object with the locator registry. See {@link LocatorRegistry::setServerProcessProxy}. | ||
| interface Process | ||
| { | ||
| /// Initiates a graceful shutdown of the server application. | ||
| void shutdown(); | ||
|
|
||
| /// Writes a message on the server application's stdout or stderr. | ||
| /// @param message The message to write. | ||
| /// @param fd 1 for stdout, 2 for stderr. | ||
| void writeMessage(string message, int fd); | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BuiltinSequences.ice etc are identical to the files in https://github.com/zeroc-ice/ice/tree/main/slice (main and 3.8), except for the addition of the
#ifdef __ICERPC__block.