Ejemplo n.º 1
0
	extern public static Xlib.Xint IceRegisterForProtocolReply
			(String protocolName, String vendor, String release,
			 Xlib.Xint versionCount, ref IcePaVersionRec versionRecs,
			 Xlib.Xint authCount, ref String[] authNames,
			 ref IcePaAuthProc authProcs,
			 IceHostBasedAuthProc hostBasedAuthProc,
			 IceProtocolSetupProc protocolSetupProc,
			 IceProtocolActivateProc protocolActivateProc,
			 IceIOErrorProc ioErrorProc);
Ejemplo n.º 2
0
	extern public static XStatus IceListenForWellKnownConnections
			(String port, ref Xlib.Xint countRet, ref IntPtr listenObjsRet,
			 Xlib.Xint errorLength, byte[] errorStringRet);
Ejemplo n.º 3
0
	extern public static IceConn *IceOpenConnection
			(String networkIdsList, IntPtr context,
			 XBool mustAuthenticate, Xlib.Xint majorOpcodeCheck,
			 Xlib.Xint errorLength, byte[] errorStringRet);
Ejemplo n.º 4
0
	extern public static Xlib.Xint IceRegisterForProtocolSetup
			(String protocolName, String vendor, String release,
			 Xlib.Xint versionCount, ref IcePoVersionRec versionRecs,
			 Xlib.Xint authCount, String[] authNames,
			 ref IcePoAuthProcIncapsulator authProcs, IceIOErrorProc ioErrorProc);
Ejemplo n.º 5
0
	extern public static void _IceErrorBadLength
			(IceConn *iceConn, Xlib.Xint majorOpcode,
			 Xlib.Xint offendingMinor, Xlib.Xint severity);
Ejemplo n.º 6
0
	extern public static void _IceErrorBadValue
			(IceConn *iceConn, Xlib.Xint majorOpcode,
			 Xlib.Xint offendingMinor, Xlib.Xint offset,
			 Xlib.Xint length, IntPtr value);
Ejemplo n.º 7
0
	extern public static void _IceReadSkip
			(IceConn *iceConn, Xlib.Xulong nbytes);
Ejemplo n.º 8
0
	extern public static IceConn *IceAcceptConnection
			(IntPtr listenObj, ref Xlib.Xint statusRet);
Ejemplo n.º 9
0
	extern public static Xlib.Xint _IcePaMagicCookie1Proc
			(IntPtr iceConn, IntPtr authStatePtr,
			 XBool swap, Xlib.Xint authDataLen, IntPtr authData,
			 ref Xlib.Xint replyDataLenRet, ref IntPtr replyDataRet,
			 ref IntPtr errorStringRet);
Ejemplo n.º 10
0
	extern public static XStatus _IceRead
			(IceConn *iceConn, Xlib.Xulong nbytes, byte[] ptr);
Ejemplo n.º 11
0
	extern public static IntPtr IceAllocScratch
			(IceConn *iceConn, Xlib.Xulong size);
Ejemplo n.º 12
0
	extern public static XStatus IceProtocolShutdown
			(IceConn *iceConn, Xlib.Xint majorOpcode);
Ejemplo n.º 13
0
	extern public static Xlib.Xint IceProtocolSetup
			(IceConn *iceConn, Xlib.Xint myOpcode, IntPtr clientData,
			 XBool mustAuthenticate, out Xlib.Xint majorVersionRet,
			 out Xlib.Xint minorVersionRet, out IntPtr vendorRet,
			 out IntPtr releaseRet, Xlib.Xint errorLength,
			 byte[] errorStringRet);
Ejemplo n.º 14
0
	extern public static String IceComposeNetworkIdList
			(Xlib.Xint count, IntPtr listenObjs);
Ejemplo n.º 15
0
	extern public static void _IceWrite
			(IceConn *iceConn, Xlib.Xulong nbytes, byte[] ptr);
Ejemplo n.º 16
0
	extern public static void IceFreeListenObjs
			(Xlib.Xint count, IntPtr listenObjs);
Ejemplo n.º 17
0
	// Callback from "libICE" to process a message.
	private void ProcessMessage
				(IntPtr iceConn, IntPtr clientData, Xlib.Xint opcode,
				 Xlib.Xulong length, XBool swap,
				 ref IceReplyWaitInfo replyWait, ref XBool replyReadyRet)
			{
				bool haveReply;
				if(messageTransaction)
				{
					throw new XInvalidOperationException("Attempt to process message in the middle of sending another one"); // I always wondered, what will happen if we throw exception from callback? :)
				}

				this.messageTransaction = true;
				this.messageLength = (int)length;

				// Process the message.
				try
				{
					replyWait = replyWait;
					haveReply = true;
					replyReadyRet = ProcessMessage((int)opcode, replyWait.reply) ? XBool.True:XBool.False; // We omit `swap' here, can one need it? Even theoretrically?..
				}
				catch (NullReferenceException)
				{
					haveReply = false;
					replyReadyRet = ProcessMessage((int)opcode) ? XBool.True:XBool.False;
				}

				this.messageTransaction = false;
			}