miranda/Hyphen/Virtuoso.Hyphen/Mini/Mini.il
2013-06-25 22:53:41 +00:00

232 lines
6.7 KiB
Plaintext

/***********************************************************************\
* Virtuoso.Miranda.Plugins (Hyphen) *
* Provides a managed wrapper for API of IM client Miranda. *
* Copyright (C) 2006-2009 virtuoso *
* deml.tomas@seznam.cz *
* *
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Lesser General Public *
* License as published by the Free Software Foundation; either *
* version 2.1 of the License, or (at your option) any later version. *
* *
* This library is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
* Lesser General Public License for more details. *
\***********************************************************************/
/***********************************************************************/
/* DO NOT EDIT THIS FILE UNLESS YOU KNOW WHAT EXACTLY YOU ARE DOING */
/***********************************************************************/
.assembly extern mscorlib
{
.publickeytoken = (B7 7A 5C 56 19 34 E0 89)
.ver 2:0:0:0
}
.assembly extern System
{
.publickeytoken = (B7 7A 5C 56 19 34 E0 89)
.ver 2:0:0:0
}
.assembly extern Hyphen as core
{
.publickeytoken = (87 bb 0d 20 45 1d fb 58)
.ver 0:8:5:1101
}
.module 'Virtuoso.Hyphen.Mini.dll'
/* THIS REALLY MUST NOT BE CHANGED */
/* First 3 numbers declare minimal supported version of Hyphen. */
.assembly 'Virtuoso.Hyphen.Mini'
{
.ver 0:8:5:0
}
/* THIS REALLY MUST NOT BE CHANGED */
.corflags 0x00000002
.vtfixup [7] int32 fromunmanaged at VT
.data VT = int32[7]
.field private static class [core]Virtuoso.Hyphen.Mini.Module Connection
.method private static void Connect(bool ex) cil managed synchronized noinlining
{
ldsfld class [core]Virtuoso.Hyphen.Mini.Module Connection
brtrue CONNECTED
ldarg.0
newobj instance void [core]Virtuoso.Hyphen.Mini.Module::.ctor(bool)
stsfld class [core]Virtuoso.Hyphen.Mini.Module Connection
CONNECTED:
ret
}
.method public static native int
modopt([mscorlib]System.Runtime.CompilerServices.CallConvCdecl) MirandaPluginInfoThunk(unsigned int32 version) cil managed
{
.vtentry 1:1
.export [1] as MirandaPluginInfo
.try {
// False, pre-0.7#20 API
ldc.i4.0
// Catch potential exceptions caused by loader incompatibility
call void Connect(bool)
leave.s SUCCESS
}
catch [mscorlib]System.Exception {
leave.s FAILURE
}
SUCCESS:
// version
ldarg.0
tail. call native int modopt([mscorlib]System.Runtime.CompilerServices.CallConvCdecl) MirandaPluginInfo(unsigned int32)
ret
FAILURE:
ldc.i4.0
ret
}
.method public static native int
modopt([mscorlib]System.Runtime.CompilerServices.CallConvCdecl) MirandaPluginInfoExThunk(unsigned int32 version) cil managed
{
.vtentry 1:2
.export [2] as MirandaPluginInfoEx
.try {
// True, post-v0.7#20 API
ldc.i4.1
// Catch potential exceptions caused by loader incompatibility
call void Connect(bool)
leave.s SUCCESS
}
catch [mscorlib]System.Exception {
leave.s FAILURE
}
SUCCESS:
// version
ldarg.0
tail. call native int modopt([mscorlib]System.Runtime.CompilerServices.CallConvCdecl) MirandaPluginInfo(unsigned int32)
ret
FAILURE:
ldc.i4.0
ret
}
.method private static native int
modopt([mscorlib]System.Runtime.CompilerServices.CallConvCdecl) MirandaPluginInfo(unsigned int32 version) cil managed noinlining
{
// this
ldsfld class [core]Virtuoso.Hyphen.Mini.Module Connection
// version
ldarg.0
call instance native int [core]Virtuoso.Hyphen.Mini.Module::MirandaPluginInfo(unsigned int32)
ret
}
.method public static native int
modopt([mscorlib]System.Runtime.CompilerServices.CallConvCdecl) MirandaPluginInterfaces() cil managed
{
.vtentry 1:3
.export [3] as MirandaPluginInterfaces
// this
ldsfld class [core]Virtuoso.Hyphen.Mini.Module Connection
call instance native int [core]Virtuoso.Hyphen.Mini.Module::MirandaPluginInterfaces()
ret
}
.method public static int32
modopt([mscorlib]System.Runtime.CompilerServices.CallConvCdecl) Load(native int pPluginLink) cil managed
{
.vtentry 1:4
.export [4] as Load
ldsfld class [core]Virtuoso.Hyphen.Mini.Module Connection
ldarg.0
call instance int32 [core]Virtuoso.Hyphen.Mini.Module::Load(native int)
ret
}
.method public static int32
modopt([mscorlib]System.Runtime.CompilerServices.CallConvCdecl) Unload() cil managed
{
.vtentry 1:5
.export [5] as Unload
ldsfld class [core]Virtuoso.Hyphen.Mini.Module Connection
call instance int32 [core]Virtuoso.Hyphen.Mini.Module::Unload()
ret
}
/***************************************************************************************************************************/
/* HELPERS */
/***************************************************************************************************************************/
.method assembly static object[] NewVector(object) cil managed
{
ldc.i4.1
newarr [mscorlib]System.Object
dup
ldc.i4.0
ldarg.0
stelem.ref
ret
}
/***************************************************************************************************************************/
/* SPECIAL EXPORTS */
/***************************************************************************************************************************/
/* CList Exports
* int CListInitialise(PLUGINLINK* pluginLink); */
.method public static int32
modopt([mscorlib]System.Runtime.CompilerServices.CallConvCdecl) CListInitialise(native int pPluginLink) cil managed
{
.vtentry 1:6
.export [6] as CListInitialise
ldarg.0
call int32 modopt([mscorlib]System.Runtime.CompilerServices.CallConvCdecl) Load(native int)
ret
}
/* DB Exports
* DATABASELINK* DatabasePluginInfo(void* reserved); */
.method public static native int
modopt([mscorlib]System.Runtime.CompilerServices.CallConvCdecl) DatabasePluginInfo(native int pReserved) cil managed
{
.vtentry 1:7
.export [7] as DatabasePluginInfo
ldsfld class [core]Virtuoso.Hyphen.Mini.Module Connection
ldstr "DatabasePluginInfo"
ldarg.0
box [mscorlib]System.IntPtr
call object[] NewVector(object)
call instance !!0 [core]Virtuoso.Hyphen.Mini.Module::ExecuteCustomApiExport<native int>(string, object[])
ret
}