Sun, 15 Apr 2007 02:10:37 +0000
propagate from branch 'im.pidgin.gaim' (head b2836a24d81e7a1bd1d21b3aea8794b094391344)
to branch 'im.pidgin.rlaager.merging.soc-msnp13-to-svn18164' (head 463b4fa9f067b279f843520d95a822adc86a0a1b)
| 11660 | 1 | using Gaim; |
| 2 | ||
|
20466
4cb7f3b19ffa
sf patch #1639901, from Saleem Abdulrasool
Mark Doliner <markdoliner@pidgin.im>
parents:
14254
diff
changeset
|
3 | public class MPlugin : Plugin |
| 11660 | 4 | { |
|
20466
4cb7f3b19ffa
sf patch #1639901, from Saleem Abdulrasool
Mark Doliner <markdoliner@pidgin.im>
parents:
14254
diff
changeset
|
5 | private static PluginInfo info = new PluginInfo("C# Plugin", "0.1", "Test C# Plugin", "Longer Description", "Eoin Coffey", "urled"); |
|
4cb7f3b19ffa
sf patch #1639901, from Saleem Abdulrasool
Mark Doliner <markdoliner@pidgin.im>
parents:
14254
diff
changeset
|
6 | |
|
4cb7f3b19ffa
sf patch #1639901, from Saleem Abdulrasool
Mark Doliner <markdoliner@pidgin.im>
parents:
14254
diff
changeset
|
7 | public MPlugin() |
|
4cb7f3b19ffa
sf patch #1639901, from Saleem Abdulrasool
Mark Doliner <markdoliner@pidgin.im>
parents:
14254
diff
changeset
|
8 | : base(info) |
|
4cb7f3b19ffa
sf patch #1639901, from Saleem Abdulrasool
Mark Doliner <markdoliner@pidgin.im>
parents:
14254
diff
changeset
|
9 | { |
|
4cb7f3b19ffa
sf patch #1639901, from Saleem Abdulrasool
Mark Doliner <markdoliner@pidgin.im>
parents:
14254
diff
changeset
|
10 | } |
|
4cb7f3b19ffa
sf patch #1639901, from Saleem Abdulrasool
Mark Doliner <markdoliner@pidgin.im>
parents:
14254
diff
changeset
|
11 | |
| 11660 | 12 | public void HandleSig(object[] args) |
| 13 | { | |
| 14 | Buddy buddy = (Buddy)args[0]; | |
|
11980
fe5c2c58508c
[gaim-migrate @ 14273]
Eoin Coffey <ecoffey@soc.pidgin.im>
parents:
11660
diff
changeset
|
15 | Status old_status = (Status)args[1]; |
|
fe5c2c58508c
[gaim-migrate @ 14273]
Eoin Coffey <ecoffey@soc.pidgin.im>
parents:
11660
diff
changeset
|
16 | Status status = (Status)args[2]; |
| 11660 | 17 | |
|
11980
fe5c2c58508c
[gaim-migrate @ 14273]
Eoin Coffey <ecoffey@soc.pidgin.im>
parents:
11660
diff
changeset
|
18 | Debug.debug(Debug.INFO, "mplug", "buddy " + buddy.Name + " went from " + old_status.Id + " to " + status.Id + "\n"); |
| 11660 | 19 | } |
| 20 | ||
| 21 | public override void Load() | |
| 22 | { | |
| 23 | Debug.debug(Debug.INFO, "mplug", "loading...\n"); | |
| 24 | ||
| 25 | /*Signal.connect(BuddyList.GetHandle(), this, "buddy-away", new Signal.Handler(HandleSig));*/ | |
|
11980
fe5c2c58508c
[gaim-migrate @ 14273]
Eoin Coffey <ecoffey@soc.pidgin.im>
parents:
11660
diff
changeset
|
26 | BuddyList.OnBuddyStatusChanged.connect(this, new Signal.Handler(HandleSig)); |
| 11660 | 27 | } |
| 28 | ||
| 29 | public override void Unload() | |
| 30 | { | |
| 31 | Debug.debug(Debug.INFO, "mplug", "unloading...\n"); | |
| 32 | } | |
| 33 | ||
| 34 | public override void Destroy() | |
| 35 | { | |
| 36 | Debug.debug(Debug.INFO, "mplug", "destroying...\n"); | |
| 37 | } | |
| 38 | } |