pub struct CapeRegistrar {
pub(crate) interface: *mut ICapePMCRegistrar,
}Expand description
Rust wrapper for ICapePMCRegistrar interface
A CapeRegistrar object is passed to the registration_details function
of the CapePMC trait implementation. It is used to register the component
in the COBIA registry.
Fields§
§interface: *mut ICapePMCRegistrarPointer to the ICapePMCRegistrar interface
Implementations§
Source§impl CapeRegistrar
impl CapeRegistrar
Sourcepub fn put_description(&self, description: &str) -> Result<(), COBIAError>
pub fn put_description(&self, description: &str) -> Result<(), COBIAError>
Sourcepub fn put_cape_version(&self, cape_version: &str) -> Result<(), COBIAError>
pub fn put_cape_version(&self, cape_version: &str) -> Result<(), COBIAError>
Sourcepub fn put_component_version(
&self,
component_version: &str,
) -> Result<(), COBIAError>
pub fn put_component_version( &self, component_version: &str, ) -> Result<(), COBIAError>
Sourcepub fn put_vendor_url(&self, vendor_url: &str) -> Result<(), COBIAError>
pub fn put_vendor_url(&self, vendor_url: &str) -> Result<(), COBIAError>
Sourcepub fn put_help_url(&self, help_url: &str) -> Result<(), COBIAError>
pub fn put_help_url(&self, help_url: &str) -> Result<(), COBIAError>
Sourcepub fn put_prog_id(&self, prog_id: &str) -> Result<(), COBIAError>
pub fn put_prog_id(&self, prog_id: &str) -> Result<(), COBIAError>
Put the ProgID of the component
The ProgID is a programmatic human readable ID that is a placeholder for the component’s UUID.
The ProgID points to this specific version of the component. The version-independent ProgID is used to identify the component regardless of its version.
§Arguments
prog_id- The ProgID of the component, a string identifier used in COM
Sourcepub fn put_version_independent_prog_id(
&self,
prog_id: &str,
) -> Result<(), COBIAError>
pub fn put_version_independent_prog_id( &self, prog_id: &str, ) -> Result<(), COBIAError>
Put the version-independent ProgID of the component
The version-independent ProgID is used to identify the component regardless of its version. If a PME chooses to store this information, a subsequent software update of the component will cause the PME to update to the new version. s
§Arguments
prog_id- The version-independent ProgID of the component, a string identifier used in COM
§Returns
- Result<(), COBIAError> - Ok if successful, Err if there was an error
Sourcepub fn add_cat_id(&self, cat_id: &CapeUUID) -> Result<(), COBIAError>
pub fn add_cat_id(&self, cat_id: &CapeUUID) -> Result<(), COBIAError>
Add a category ID to the component
Typically a PMC registers with at least one category ID to indicate the type of component it is, such as a unit operation, property set, or data type. Also at least one category ID should be added to identify which CAPE-OPEN version the component supports.
§Arguments
cat_id- The category ID to add, a unique identifier for the component’s category
§Returns
- Result<(), COBIAError> - Ok if successful, Err if there was an error
Sourcepub fn put_flags(
&self,
flags: CapePMCRegistrationFlags,
) -> Result<(), COBIAError>
pub fn put_flags( &self, flags: CapePMCRegistrationFlags, ) -> Result<(), COBIAError>
Put the creation flags for the component
If the component has specific restrictions, such as being suitable only for the restricted threading model, this method can be used to set those flags.
§Arguments
flags- The flags to set, indicating the component’s creation restrictions
§Returns
- Result<(), COBIAError> - Ok if successful, Err if there was an error
Sourcepub fn add_location(
&self,
service_type: CapePMCServiceType,
location: &str,
) -> Result<(), COBIAError>
pub fn add_location( &self, service_type: CapePMCServiceType, location: &str, ) -> Result<(), COBIAError>
Add a location for the component
Components can be registered for multiple service types, such as 32-bit and 64-bit versions for Windows. Eeach service type has its own location identifier, such as a DLL or shared object for an in-process implementation.
§Arguments
service_type- The service type for which the location is being registeredlocation- The location identifier, such as a DLL path
§Returns
- Result<(), COBIAError> - Ok if successful, Err if there was an error
Trait Implementations§
Source§impl Clone for CapeRegistrar
Add pointer reference
impl Clone for CapeRegistrar
Add pointer reference
ICapeRegistrar derives from ICobiaBase, which contains addReference() and release(). The Clone trait calls addReference.