Mercurial > pidgin
comparison libpurple/plugins/mono/api/PurplePlugin.cs @ 15876:80ee585fb53c
SF Patch #1686400 from Eoin Coffey ("ecoffey")
ecoffey described the changes:
1) Small tweaks to the loader to bring it up to speed with new mono
versions and API wrapper changes that grim had made. (was in original
patch, just forgot about it :-P)
2) .NET Plugins are now required to define an Id as part of their info.
3) Modified gaim_probe_plugin to check for existence of info->id and to
make sure it's not empty; Prints an error, stores an error in the plugin
and sets plugin->unloadable = TRUE.
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Sat, 24 Mar 2007 06:24:59 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
15874:23367ba62f59 | 15876:80ee585fb53c |
---|---|
1 namespace Purple { | |
2 public class PluginInfo { | |
3 private string id; | |
4 private string name; | |
5 private string version; | |
6 private string summary; | |
7 private string description; | |
8 private string author; | |
9 private string homepage; | |
10 | |
11 public PluginInfo(string id, string name, string version, string summary, | |
12 string description, string author, string homepage) | |
13 { | |
14 this.id = id; | |
15 this.name = name; | |
16 this.version = version; | |
17 this.summary = summary; | |
18 this.description = description; | |
19 this.author = author; | |
20 this.homepage = homepage; | |
21 } | |
22 | |
23 public string Id { | |
24 get { return id; } | |
25 } | |
26 | |
27 public string Name { | |
28 get { return name; } | |
29 } | |
30 | |
31 public string Version { | |
32 get { return version; } | |
33 } | |
34 | |
35 public string Summary { | |
36 get { return summary; } | |
37 } | |
38 | |
39 public string Description { | |
40 get { return description; } | |
41 } | |
42 | |
43 public string Author { | |
44 get { return author; } | |
45 } | |
46 | |
47 public string Homepage { | |
48 get { return homepage; } | |
49 } | |
50 } | |
51 | |
52 abstract public class Plugin { | |
53 private PluginInfo info; | |
54 | |
55 public Plugin(PluginInfo info) { | |
56 this.info = info; | |
57 } | |
58 | |
59 public abstract void Load(); | |
60 public abstract void Unload(); | |
61 public abstract void Destroy(); | |
62 | |
63 public PluginInfo Info { | |
64 get { return info; } | |
65 } | |
66 } | |
67 } |