MateComponentMoniker

## MateComponentMoniker MateComponentMoniker — The base implementation of our abstract object naming space |

## Synopsis

                        MateComponentMoniker;
                        MateComponentMonikerClass;
    MateComponentMoniker *     matecomponent_moniker_construct            (MateComponentMoniker *moniker,
                                                             const char *prefix);
    MateComponent_Moniker      matecomponent_moniker_get_parent           (MateComponentMoniker *moniker,
                                                             CORBA_Environment *opt_ev);
    void                matecomponent_moniker_set_parent           (MateComponentMoniker *moniker,
                                                             MateComponent_Moniker parent,
                                                             CORBA_Environment *opt_ev);
    const char *        matecomponent_moniker_get_name             (MateComponentMoniker *moniker);
    const char *        matecomponent_moniker_get_name_full        (MateComponentMoniker *moniker);
    char *              matecomponent_moniker_get_name_escaped     (MateComponentMoniker *moniker);
    void                matecomponent_moniker_set_name             (MateComponentMoniker *moniker,
                                                             const char *name);
    const char *        matecomponent_moniker_get_prefix           (MateComponentMoniker *moniker);
    void                matecomponent_moniker_set_case_sensitive   (MateComponentMoniker *moniker,
                                                             gboolean sensitive);
    gboolean            matecomponent_moniker_get_case_sensitive   (MateComponentMoniker *moniker);

## Object Hierarchy

      GObject
       +----MateComponentObject
             +----MateComponentMoniker
                   +----MateComponentMonikerSimple

## Description

Monikers are used to name objects, they effectively implement an object naming space. You can obtain monikers either because you created the moniker manually, or from a stringified representation of a moniker.

For more information see matecomponent/doc/Monikers, relatively few people want to implement monikers, mostly they just want to use them. To do this you need the matecomponent-moniker-util API.

To implement your own moniker, it is most likely that you want to use MateComponentMonikerSimple, MateComponentMoniker is a mostly abstract base class that in some obscure cases might provide a more powerful feature set. Most people use MateComponentMonikerSimple.

## Details

### MateComponentMoniker

    typedef struct _MateComponentMoniker MateComponentMoniker;

Implements MateComponent::Moniker

### MateComponentMonikerClass

    typedef struct {
    	MateComponentObjectClass      parent_class;

    	POA_MateComponent_Moniker__epv epv;

    	/* virtual methods */
    	MateComponent_Unknown (*resolve)            (MateComponentMoniker               *moniker,
    					      const MateComponent_ResolveOptions *options,
    					      const CORBA_char            *requested_interface,
    					      CORBA_Environment           *ev);

    	void           (*set_internal_name)  (MateComponentMoniker               *moniker,
    					      const char                  *unescaped_name);
    	const char    *(*get_internal_name)  (MateComponentMoniker               *moniker);

    	gpointer        dummy;
    } MateComponentMonikerClass;

MateComponentMoniker's class

### matecomponent_moniker_construct ()

    MateComponentMoniker *     matecomponent_moniker_construct            (MateComponentMoniker *moniker,
                                                             const char *prefix);

Constructs a newly created matecomponent moniker with the given arguments.

`moniker` : | an un-constructed moniker object.
`prefix` : | the prefix name of the moniker eg. 'file:', '!' or 'tar:' or NULL
Returns : | the constructed moniker or NULL on failure.

### matecomponent_moniker_get_parent ()

    MateComponent_Moniker      matecomponent_moniker_get_parent           (MateComponentMoniker *moniker,
                                                             CORBA_Environment *opt_ev);

See matecomponent_moniker_set_parent;

`moniker` : | the moniker
`opt_ev` : | an optional corba exception environment
Returns : | the parent of this moniker

### matecomponent_moniker_set_parent ()

    void                matecomponent_moniker_set_parent           (MateComponentMoniker *moniker,
                                                             MateComponent_Moniker parent,
                                                             CORBA_Environment *opt_ev);

This sets the monikers parent; a moniker is really a long chain of hierarchical monikers; referenced by the most local moniker. This sets the parent pointer.

`moniker` : | the moniker
`parent` : | the parent
`opt_ev` : | an optional corba exception environment

### matecomponent_moniker_get_name ()

    const char *        matecomponent_moniker_get_name             (MateComponentMoniker *moniker);

gets the unescaped name of the moniker less the prefix eg file:/tmp/hash#.gz returns /tmp/hash.gz

`moniker` : | the moniker
Returns : | the string or NULL in case of failure

### matecomponent_moniker_get_name_full ()

    const char *        matecomponent_moniker_get_name_full        (MateComponentMoniker *moniker);

gets the full unescaped name of the moniker eg. file:/tmp/hash#.gz returns file:/tmp/hash.gz

`moniker` : | the moniker
Returns : | the string in case of failure

### matecomponent_moniker_get_name_escaped ()

    char *              matecomponent_moniker_get_name_escaped     (MateComponentMoniker *moniker);

Get the full, escaped name of the moniker eg. file:/tmp/hash#.gz returns file:/tmp/hash#.gz

`moniker` : | a moniker
Returns : | the dynamically allocated string, or NULL in case of failure. Must release with `g_free()`.

### matecomponent_moniker_set_name ()

    void                matecomponent_moniker_set_name             (MateComponentMoniker *moniker,
                                                             const char *name);

This functions sets the moniker name in `moniker` to be `name`.

`moniker` : | the MateComponentMoniker to configure.
`name` : | new, unescaped, name for this moniker.

### matecomponent_moniker_get_prefix ()

    const char *        matecomponent_moniker_get_prefix           (MateComponentMoniker *moniker);

`moniker` : | a moniker
Returns : | the registered prefix for this moniker or NULL if there isn't one. eg "file:", or in case of failure

### matecomponent_moniker_set_case_sensitive ()

    void                matecomponent_moniker_set_case_sensitive   (MateComponentMoniker *moniker,
                                                             gboolean sensitive);

Sets up whether we use case sensitivity for the default equal impl.

`moniker` : | the moniker
`sensitive` : | whether to see case on equality compare

### matecomponent_moniker_get_case_sensitive ()

    gboolean            matecomponent_moniker_get_case_sensitive   (MateComponentMoniker *moniker);

`moniker` : | the moniker
Returns : | whether we use case sensitivity for the default equal impl.

## See Also

matecomponent-moniker-util MateComponentMonikerSimple