NAObjectAction

NAObjectAction — The Action Class Definition

Functions

Types and Values

Includes

#include <caja-actions/na-object-action.h>

Description

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

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

Functions

NA_OBJECT_ACTION()

#define NA_OBJECT_ACTION( object )           ( G_TYPE_CHECK_INSTANCE_CAST( object, NA_TYPE_OBJECT_ACTION, NAObjectAction ))

NA_IS_OBJECT_ACTION()

#define NA_IS_OBJECT_ACTION( object )        ( G_TYPE_CHECK_INSTANCE_TYPE( object, NA_TYPE_OBJECT_ACTION ))

na_object_action_new ()

NAObjectAction *
na_object_action_new (void);

Allocates a new NAObjectAction object.

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

Returns

the newly allocated NAObjectAction object.

Since: 2.30


na_object_action_new_with_profile ()

NAObjectAction *
na_object_action_new_with_profile (void);

Allocates a new NAObjectAction object along with a default profile.

Returns

the newly allocated NAObjectAction action.

Since: 2.30


na_object_action_new_with_defaults ()

NAObjectAction *
na_object_action_new_with_defaults (void);

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

Returns

the newly allocated NAObjectAction action.

Since: 2.30


na_object_action_get_new_profile_name ()

gchar *
na_object_action_get_new_profile_name (const NAObjectAction *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 NAObjectAction object which will receive a new profile.

 

Returns

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

Since: 2.30


na_object_action_attach_profile ()

void
na_object_action_attach_profile (NAObjectAction *action,
                                 NAObjectProfile *profile);

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

Parameters

action

the NAObjectAction action to which the profile will be attached.

 

profile

the NAObjectProfile profile to be attached to action .

 

Since: 2.30


na_object_action_set_last_version ()

void
na_object_action_set_last_version (NAObjectAction *action);

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

Parameters

action

the NAObjectAction action to update.

 

Since: 2.30

Types and Values

NA_TYPE_OBJECT_ACTION

#define NA_TYPE_OBJECT_ACTION                ( na_object_action_get_type())

NAObjectAction

typedef struct {
} NAObjectAction;