Mercurial > pidgin
annotate libpurple/plugins/mono/api/PurplePlugin.cs @ 24061:fba7c73c8f02
Fixed a memory error, which was due to me destroying some hashtables in the
wrong place...
Removed the inclusion of data packets of size < 1024 directly in <message/>
stanzas. The reason for this is there could be a lot of small smileys in one
message. Thus hitting stanza limits. So rather than trying to keep track of
the overall size, I let the receiver always request data it hasn't cached.
Put back creation of the PurpleConversation when sening a message if
purple_find_conversation_with_account returns NULL. This is needed for
purple_conv_custom_smiley_add
author | Marcus Lundblad <ml@update.uu.se> |
---|---|
date | Mon, 08 Sep 2008 20:48:16 +0000 |
parents | 80ee585fb53c |
children |
rev | line source |
---|---|
15876
80ee585fb53c
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@wiktel.com>
parents:
diff
changeset
|
1 namespace Purple { |
80ee585fb53c
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@wiktel.com>
parents:
diff
changeset
|
2 public class PluginInfo { |
80ee585fb53c
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@wiktel.com>
parents:
diff
changeset
|
3 private string id; |
80ee585fb53c
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@wiktel.com>
parents:
diff
changeset
|
4 private string name; |
80ee585fb53c
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@wiktel.com>
parents:
diff
changeset
|
5 private string version; |
80ee585fb53c
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@wiktel.com>
parents:
diff
changeset
|
6 private string summary; |
80ee585fb53c
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@wiktel.com>
parents:
diff
changeset
|
7 private string description; |
80ee585fb53c
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@wiktel.com>
parents:
diff
changeset
|
8 private string author; |
80ee585fb53c
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@wiktel.com>
parents:
diff
changeset
|
9 private string homepage; |
80ee585fb53c
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@wiktel.com>
parents:
diff
changeset
|
10 |
80ee585fb53c
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@wiktel.com>
parents:
diff
changeset
|
11 public PluginInfo(string id, string name, string version, string summary, |
80ee585fb53c
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@wiktel.com>
parents:
diff
changeset
|
12 string description, string author, string homepage) |
80ee585fb53c
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@wiktel.com>
parents:
diff
changeset
|
13 { |
80ee585fb53c
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@wiktel.com>
parents:
diff
changeset
|
14 this.id = id; |
80ee585fb53c
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@wiktel.com>
parents:
diff
changeset
|
15 this.name = name; |
80ee585fb53c
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@wiktel.com>
parents:
diff
changeset
|
16 this.version = version; |
80ee585fb53c
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@wiktel.com>
parents:
diff
changeset
|
17 this.summary = summary; |
80ee585fb53c
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@wiktel.com>
parents:
diff
changeset
|
18 this.description = description; |
80ee585fb53c
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@wiktel.com>
parents:
diff
changeset
|
19 this.author = author; |
80ee585fb53c
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@wiktel.com>
parents:
diff
changeset
|
20 this.homepage = homepage; |
80ee585fb53c
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@wiktel.com>
parents:
diff
changeset
|
21 } |
80ee585fb53c
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@wiktel.com>
parents:
diff
changeset
|
22 |
80ee585fb53c
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@wiktel.com>
parents:
diff
changeset
|
23 public string Id { |
80ee585fb53c
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@wiktel.com>
parents:
diff
changeset
|
24 get { return id; } |
80ee585fb53c
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@wiktel.com>
parents:
diff
changeset
|
25 } |
80ee585fb53c
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@wiktel.com>
parents:
diff
changeset
|
26 |
80ee585fb53c
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@wiktel.com>
parents:
diff
changeset
|
27 public string Name { |
80ee585fb53c
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@wiktel.com>
parents:
diff
changeset
|
28 get { return name; } |
80ee585fb53c
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@wiktel.com>
parents:
diff
changeset
|
29 } |
80ee585fb53c
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@wiktel.com>
parents:
diff
changeset
|
30 |
80ee585fb53c
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@wiktel.com>
parents:
diff
changeset
|
31 public string Version { |
80ee585fb53c
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@wiktel.com>
parents:
diff
changeset
|
32 get { return version; } |
80ee585fb53c
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@wiktel.com>
parents:
diff
changeset
|
33 } |
80ee585fb53c
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@wiktel.com>
parents:
diff
changeset
|
34 |
80ee585fb53c
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@wiktel.com>
parents:
diff
changeset
|
35 public string Summary { |
80ee585fb53c
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@wiktel.com>
parents:
diff
changeset
|
36 get { return summary; } |
80ee585fb53c
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@wiktel.com>
parents:
diff
changeset
|
37 } |
80ee585fb53c
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@wiktel.com>
parents:
diff
changeset
|
38 |
80ee585fb53c
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@wiktel.com>
parents:
diff
changeset
|
39 public string Description { |
80ee585fb53c
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@wiktel.com>
parents:
diff
changeset
|
40 get { return description; } |
80ee585fb53c
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@wiktel.com>
parents:
diff
changeset
|
41 } |
80ee585fb53c
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@wiktel.com>
parents:
diff
changeset
|
42 |
80ee585fb53c
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@wiktel.com>
parents:
diff
changeset
|
43 public string Author { |
80ee585fb53c
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@wiktel.com>
parents:
diff
changeset
|
44 get { return author; } |
80ee585fb53c
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@wiktel.com>
parents:
diff
changeset
|
45 } |
80ee585fb53c
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@wiktel.com>
parents:
diff
changeset
|
46 |
80ee585fb53c
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@wiktel.com>
parents:
diff
changeset
|
47 public string Homepage { |
80ee585fb53c
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@wiktel.com>
parents:
diff
changeset
|
48 get { return homepage; } |
80ee585fb53c
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@wiktel.com>
parents:
diff
changeset
|
49 } |
80ee585fb53c
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@wiktel.com>
parents:
diff
changeset
|
50 } |
80ee585fb53c
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@wiktel.com>
parents:
diff
changeset
|
51 |
80ee585fb53c
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@wiktel.com>
parents:
diff
changeset
|
52 abstract public class Plugin { |
80ee585fb53c
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@wiktel.com>
parents:
diff
changeset
|
53 private PluginInfo info; |
80ee585fb53c
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@wiktel.com>
parents:
diff
changeset
|
54 |
80ee585fb53c
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@wiktel.com>
parents:
diff
changeset
|
55 public Plugin(PluginInfo info) { |
80ee585fb53c
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@wiktel.com>
parents:
diff
changeset
|
56 this.info = info; |
80ee585fb53c
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@wiktel.com>
parents:
diff
changeset
|
57 } |
80ee585fb53c
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@wiktel.com>
parents:
diff
changeset
|
58 |
80ee585fb53c
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@wiktel.com>
parents:
diff
changeset
|
59 public abstract void Load(); |
80ee585fb53c
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@wiktel.com>
parents:
diff
changeset
|
60 public abstract void Unload(); |
80ee585fb53c
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@wiktel.com>
parents:
diff
changeset
|
61 public abstract void Destroy(); |
80ee585fb53c
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@wiktel.com>
parents:
diff
changeset
|
62 |
80ee585fb53c
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@wiktel.com>
parents:
diff
changeset
|
63 public PluginInfo Info { |
80ee585fb53c
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@wiktel.com>
parents:
diff
changeset
|
64 get { return info; } |
80ee585fb53c
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@wiktel.com>
parents:
diff
changeset
|
65 } |
80ee585fb53c
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@wiktel.com>
parents:
diff
changeset
|
66 } |
80ee585fb53c
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@wiktel.com>
parents:
diff
changeset
|
67 } |