Mercurial > pidgin
annotate libpurple/plugins/mono/MPlugin.cs @ 26252:535c866b433c
Hide the structs, add accessors, and fix various smaller things:
* Make the flags an enum instead of #defines
* There were two sets of _in_progress functions, removed one.
* Adjusted a few return types to match usage
* Move the fetch_count into the prpl's protocol_data (which is no longer
the JabberStream but a dedicated struct)
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Mon, 30 Mar 2009 00:42:15 +0000 |
parents | 80ee585fb53c |
children |
rev | line source |
---|---|
15876
80ee585fb53c
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@wiktel.com>
parents:
15538
diff
changeset
|
1 using Purple; |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
2 |
15538
7ae72b7c02b1
sf patch #1640011, from Celso Pinto
Mark Doliner <mark@kingant.net>
parents:
15373
diff
changeset
|
3 public class MPlugin : Plugin |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
4 { |
15876
80ee585fb53c
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@wiktel.com>
parents:
15538
diff
changeset
|
5 private static PluginInfo info = new PluginInfo("mono-mplugin", "C# Plugin", "0.1", "Test C# Plugin", "Longer Description", "Eoin Coffey", "urled"); |
15538
7ae72b7c02b1
sf patch #1640011, from Celso Pinto
Mark Doliner <mark@kingant.net>
parents:
15373
diff
changeset
|
6 |
7ae72b7c02b1
sf patch #1640011, from Celso Pinto
Mark Doliner <mark@kingant.net>
parents:
15373
diff
changeset
|
7 public MPlugin() |
7ae72b7c02b1
sf patch #1640011, from Celso Pinto
Mark Doliner <mark@kingant.net>
parents:
15373
diff
changeset
|
8 : base(info) |
7ae72b7c02b1
sf patch #1640011, from Celso Pinto
Mark Doliner <mark@kingant.net>
parents:
15373
diff
changeset
|
9 { |
7ae72b7c02b1
sf patch #1640011, from Celso Pinto
Mark Doliner <mark@kingant.net>
parents:
15373
diff
changeset
|
10 } |
7ae72b7c02b1
sf patch #1640011, from Celso Pinto
Mark Doliner <mark@kingant.net>
parents:
15373
diff
changeset
|
11 |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
12 public void HandleSig(object[] args) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
13 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
14 Buddy buddy = (Buddy)args[0]; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
15 Status old_status = (Status)args[1]; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
16 Status status = (Status)args[2]; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
17 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
18 Debug.debug(Debug.INFO, "mplug", "buddy " + buddy.Name + " went from " + old_status.Id + " to " + status.Id + "\n"); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
19 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
20 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
21 public override void Load() |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
22 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
23 Debug.debug(Debug.INFO, "mplug", "loading...\n"); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
24 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
25 /*Signal.connect(BuddyList.GetHandle(), this, "buddy-away", new Signal.Handler(HandleSig));*/ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
26 BuddyList.OnBuddyStatusChanged.connect(this, new Signal.Handler(HandleSig)); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
27 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
28 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
29 public override void Unload() |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
30 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
31 Debug.debug(Debug.INFO, "mplug", "unloading...\n"); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
32 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
33 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
34 public override void Destroy() |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
35 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
36 Debug.debug(Debug.INFO, "mplug", "destroying...\n"); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
37 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
38 } |