Utilities

Utilities — Random misc utilities to manipulate MateComponent_ServerInfo structures.

Synopsis

#include <matecomponent-activation/matecomponent-activation.h>

enum                MateComponent_ActivationPropertyType;
MateComponent_ActivationProperty * matecomponent_server_info_prop_find
                                                        (MateComponent_ServerInfo *server,
                                                         const char *prop_name);
MateComponent_ActivationID matecomponent_activation_info_stringify
                                                        (const MateComponentActivationInfo *actinfo);
MateComponentActivationInfo * matecomponent_activation_servinfo_to_actinfo
                                                        (const MateComponent_ServerInfo *servinfo);
MateComponentActivationInfo * matecomponent_activation_id_parse
                                                        (const CORBA_char *actid);
MateComponentActivationInfo * matecomponent_activation_info_new
                                                        (void);
void                matecomponent_activation_info_free  (MateComponentActivationInfo *actinfo);
const char *        matecomponent_server_info_prop_lookup
                                                        (MateComponent_ServerInfo *server,
                                                         const char *prop_name,
                                                         GSList *i18n_languages);
MateComponent_ServerInfo * matecomponent_activation_get_default_component_for_mime_type
                                                        (const char *mime_type);
GList *             matecomponent_activation_get_all_components_for_mime_type
                                                        (const char *mime_type);

Description

Details

enum MateComponent_ActivationPropertyType

typedef enum {
  MateComponent_ACTIVATION_P_STRING,
  MateComponent_ACTIVATION_P_NUMBER,
  MateComponent_ACTIVATION_P_BOOLEAN,
  MateComponent_ACTIVATION_P_STRINGV
} MateComponent_ActivationPropertyType;


matecomponent_server_info_prop_find ()

MateComponent_ActivationProperty * matecomponent_server_info_prop_find
                                                        (MateComponent_ServerInfo *server,
                                                         const char *prop_name);

Tries to find a server with the given property. Returns NULL if not found.

server :

the server where to seek the data.

prop_name :

the data to seek in the server.

Returns :

a pointer to the MateComponent_ActivationProperty structure.

matecomponent_activation_info_stringify ()

MateComponent_ActivationID matecomponent_activation_info_stringify
                                                        (const MateComponentActivationInfo *actinfo);

Warning

matecomponent_activation_info_stringify is deprecated and should not be used in newly-written code.

Serializes actinfo into a char *. Should be freed with g_free().

actinfo :

the MateComponentActivationInfo to flatten.

Returns :

the serialized version of actinfo.

matecomponent_activation_servinfo_to_actinfo ()

MateComponentActivationInfo * matecomponent_activation_servinfo_to_actinfo
                                                        (const MateComponent_ServerInfo *servinfo);

Warning

matecomponent_activation_servinfo_to_actinfo is deprecated and should not be used in newly-written code.

This function converts a MateComponent_ServerInfo structure to a MateComponentActivationInfo structure. The returned structure should be freed with matecomponent_activation_info_free.

servinfo :

An array of MateComponent_ServerInfo structures.

Returns :

a newly allocated initialized MateComponentActivationInfo structure.

matecomponent_activation_id_parse ()

MateComponentActivationInfo * matecomponent_activation_id_parse
                                                        (const CORBA_char *actid);

Warning

matecomponent_activation_id_parse is deprecated and should not be used in newly-written code.

Returns a pointer to a newly allocated MateComponentActivationInfo structure (to be freed with matecomponent_activation_info_free) initialized with the data of actid.

actid :

the activation id structure.

Returns :

the MateComponentActivationInfo corresponding to actid.

matecomponent_activation_info_new ()

MateComponentActivationInfo * matecomponent_activation_info_new
                                                        (void);

Warning

matecomponent_activation_info_new is deprecated and should not be used in newly-written code.

This function allocates a MateComponentActicationInfo structure and returns it. Should NOT be called from outside of this code.

Returns :

a newly allocated non-initialized MateComponentActicationInfo structure.

matecomponent_activation_info_free ()

void                matecomponent_activation_info_free  (MateComponentActivationInfo *actinfo);

Warning

matecomponent_activation_info_free is deprecated and should not be used in newly-written code.

Frees actinfo.

actinfo :

the MateComponentActivationInfo structure to free.

matecomponent_server_info_prop_lookup ()

const char *        matecomponent_server_info_prop_lookup
                                                        (MateComponent_ServerInfo *server,
                                                         const char *prop_name,
                                                         GSList *i18n_languages);

matecomponent_activation_get_default_component_for_mime_type ()

MateComponent_ServerInfo * matecomponent_activation_get_default_component_for_mime_type
                                                        (const char *mime_type);

Query the MIME database for the default MateComponent component to be activated to view files of MIME type mime_type.

mime_type :

a const char * containing a mime type, e.g. "image/png".

Returns :

a MateComponent_ServerInfo * representing the OAF server to be activated to get a reference to the proper component.

Since 2.16.0


matecomponent_activation_get_all_components_for_mime_type ()

GList *             matecomponent_activation_get_all_components_for_mime_type
                                                        (const char *mime_type);

Return an alphabetically sorted list of MateComponent_ServerInfo data structures representing all MateComponent components registered to handle files of mime_type (and supertypes).

mime_type :

a const char * containing a mime type, e.g. "image/png".

Returns :

a GList * where the elements are MateComponent_ServerInfo * representing components that can handle mime_type.

Since 2.16.0