## FMAObjectAction FMAObjectAction — The Action Class Definition |

## Functions

#define | FMA_OBJECT_ACTION()
#define | FMA_IS_OBJECT_ACTION()
FMAObjectAction * | fma_object_action_new ()
FMAObjectAction * | fma_object_action_new_with_profile ()
FMAObjectAction * | fma_object_action_new_with_defaults ()
gchar * | fma_object_action_get_new_profile_name ()
void | fma_object_action_attach_profile ()
void | fma_object_action_set_last_version ()

## Types and Values

#define | FMA_TYPE_OBJECT_ACTION
| FMAObjectAction

## Includes

    #include <filemanager-actions/fma-object-action.h>

## Description

This is the class which maintains data and properties of a FileManager-Actions™ action.

Edition status. As a particular rule for a FMAObjectItem -derived class, a FMAObjectAction is considered modified as soon as any of its profiles has been modified itself (because they are saved as a whole).

## Functions

### FMA_OBJECT_ACTION()

    #define FMA_OBJECT_ACTION( object )           ( G_TYPE_CHECK_INSTANCE_CAST( object, FMA_TYPE_OBJECT_ACTION, FMAObjectAction ))

### FMA_IS_OBJECT_ACTION()

    #define FMA_IS_OBJECT_ACTION( object )        ( G_TYPE_CHECK_INSTANCE_TYPE( object, FMA_TYPE_OBJECT_ACTION ))

### fma_object_action_new ()

    FMAObjectAction *
    fma_object_action_new (void);

Allocates a new FMAObjectAction object.

The new FMAObjectAction object is initialized with suitable default values, but without any profile.

#### Returns

the newly allocated FMAObjectAction object.

Since: 2.30

### fma_object_action_new_with_profile ()

    FMAObjectAction *
    fma_object_action_new_with_profile (void);

Allocates a new FMAObjectAction object along with a default profile.

#### Returns

the newly allocated FMAObjectAction action.

Since: 2.30

### fma_object_action_new_with_defaults ()

    FMAObjectAction *
    fma_object_action_new_with_defaults (void);

Allocates a new FMAObjectAction object along with a default profile. These two objects have suitable default values.

#### Returns

the newly allocated FMAObjectAction action.

Since: 2.30

### fma_object_action_get_new_profile_name ()

    gchar *
    fma_object_action_get_new_profile_name
                                   (const FMAObjectAction *action);

Returns a name suitable as a new profile name.

The search is made by iterating over the standard profile name prefix : basically, we increment a counter until finding a name which is not yet allocated. The provided name is so only suitable for the specified `action` .

When inserting a list of profiles in the action, we iter first for new names, before actually do the insertion. We so keep the last allocated name to avoid to allocate the same one twice.

#### Parameters

action | the FMAObjectAction object which will receive a new profile. |

#### Returns

a newly allocated profile name, which should be `g_free()` by the caller.

Since: 2.30

### fma_object_action_attach_profile ()

    void
    fma_object_action_attach_profile (FMAObjectAction *action,
                                      FMAObjectProfile *profile);

Adds a profile at the end of the list of profiles.

#### Parameters

action | the FMAObjectAction action to which the profile will be attached. |
profile | the FMAObjectProfile profile to be attached to `action` . |

Since: 2.30

### fma_object_action_set_last_version ()

    void
    fma_object_action_set_last_version (FMAObjectAction *action);

Set the version number of the `action` to the last one.

#### Parameters

action | the FMAObjectAction action to update. |

Since: 2.30

## Types and Values

### FMA_TYPE_OBJECT_ACTION

    #define FMA_TYPE_OBJECT_ACTION                ( fma_object_action_get_type())

### FMAObjectAction

    typedef struct {
    } FMAObjectAction;