~kbailey4444/pantheon-photos/fix-1363541

« back to all changes in this revision

Viewing changes to src/plugins/SpitInterfaces.vala

  • Committer: Jim Nelson
  • Date: 2011-02-18 04:00:18 UTC
  • Revision ID: git-v1:76304ef3341384605ef71c4c4bd4289e23cc9c52
#3170: Plugins can now be enabled/disabled via the Preferences dialog.

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
    //
51
51
    // Returns a (potentially) user-visible string describing the module (i.e. the .so/.la file).
52
52
    //
53
 
    public abstract string get_name();
 
53
    public abstract unowned string get_module_name();
54
54
    
55
55
    //
56
56
    // Returns a (potentially) user-visible string describing the module version.  Note that this
57
57
    // may be programmatically interpreted at some point, so use a widespread versioning scheme.
58
58
    //
59
 
    public abstract string get_version();
 
59
    public abstract unowned string get_version();
60
60
    
61
61
    //
62
62
    // Returns a unique identifier for this module.  This is used to differentiate between multiple
66
66
    // Best practice: use a reverse-DNS-order scheme, a la Java's packages
67
67
    // (i.e. "org.yorba.shotwell.frotz").
68
68
    //
69
 
    public abstract string get_id();
 
69
    public abstract unowned string get_id();
70
70
    
71
71
    //
72
72
    // Returns an array of Pluggables that represent each plug-in available in the module.
73
73
    // May return NULL or an empty array.
74
74
    //
75
 
    public abstract Pluggable[]? get_pluggables();
 
75
    public abstract unowned Pluggable[]? get_pluggables();
76
76
    
77
77
    //
78
78
    // For future expansion.
116
116
    // Returns a unique identifier for this Pluggable.  Like Spit.Module.get_id(), best practice is 
117
117
    // to use a reverse-DNS-order scheme to avoid conflicts.
118
118
    //
119
 
    public abstract string get_id();
 
119
    public abstract unowned string get_id();
120
120
    
121
121
    //
122
122
    // Returns a user-visible name for the Pluggable.
123
123
    //
124
 
    public abstract string get_pluggable_name();
 
124
    public abstract unowned string get_pluggable_name();
125
125
    
126
126
    //
127
127
    // Returns extra information about the Pluggable that is used to identify it to the user.
129
129
    public abstract void get_info(out PluggableInfo info);
130
130
    
131
131
    //
 
132
    // Called when the Pluggable is enabled (activated) or disabled (deactivated).  It will be 
 
133
    // called at the start of the program if the user previously enabled/disabled it as well as 
 
134
    // during program execution if the user changes its state.  Note that disabling a Pluggable
 
135
    // does not require destroying existing resources or objects the Pluggable has previously
 
136
    // handed off to the host.
 
137
    //
 
138
    // This is purely informational.  The Pluggable should acquire any long-term resources it
 
139
    // may be holding onto here, or wait until an extension-specific call is made to it.
 
140
    //
 
141
    public abstract void activation(bool enabled);
 
142
    
 
143
    //
132
144
    // For future expansion.
133
145
    //
134
146
    public virtual void reserved0() {}