101 lines
2.5 KiB
Text
101 lines
2.5 KiB
Text
'***************************************************************************
|
|
'
|
|
' XmlRpc.class
|
|
'
|
|
' (c)2005 - Daniel Campos Fernández
|
|
'
|
|
' XML-RPC Component
|
|
'
|
|
' Realizado para la Junta de Extremadura.
|
|
' Consejería de Educación Ciencia y Tecnología.
|
|
' Proyecto gnuLinEx
|
|
'
|
|
' This program Is free software; you can redistribute it And / Or modify
|
|
' it under the terms OF the GNU General PUBLIC License AS published by
|
|
' the Free Software Foundation; either version 1, Or (at your option)
|
|
' any later version.
|
|
'
|
|
' This program 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 General PUBLIC License FOR more details.
|
|
'
|
|
' You should have received a COPY OF the GNU General PUBLIC License
|
|
' along WITH this program; IF Not, WRITE TO the Free Software
|
|
' Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
'
|
|
'***************************************************************************
|
|
EXPORT
|
|
|
|
'***********************************************
|
|
' Data types for XML-RPC calls
|
|
'***********************************************
|
|
STATIC PUBLIC CONST xInteger AS Integer = 0
|
|
STATIC PUBLIC CONST xBoolean AS Integer = 1
|
|
STATIC PUBLIC CONST xDouble AS Integer = 2
|
|
STATIC PUBLIC CONST xString AS Integer = 3
|
|
STATIC PUBLIC CONST xBase64 AS Integer = 4
|
|
STATIC PUBLIC CONST xDate AS Integer = 5
|
|
STATIC PUBLIC CONST xStruct AS Integer = 6
|
|
STATIC PUBLIC CONST xArray AS Integer = 7
|
|
STATIC PUBLIC CONST xVoid AS Integer = 8
|
|
|
|
STATIC PUBLIC FUNCTION ToType(type AS String) AS Integer
|
|
|
|
|
|
SELECT CASE type
|
|
|
|
CASE "int"
|
|
RETURN XmlRpc.xInteger
|
|
CASE "i4"
|
|
RETURN XmlRpc.xInteger
|
|
CASE "boolean"
|
|
RETURN XmlRpc.xBoolean
|
|
CASE "double"
|
|
RETURN XmlRpc.xDouble
|
|
CASE "string"
|
|
RETURN XmlRpc.xString
|
|
CASE "base64"
|
|
RETURN XmlRpc.xBase64
|
|
CASE "dateTime.iso8601"
|
|
RETURN XmlRpc.xDate
|
|
CASE "struct"
|
|
RETURN XmlRpc.xStruct
|
|
CASE "array"
|
|
RETURN XmlRpc.xArray
|
|
|
|
END SELECT
|
|
|
|
RETURN -1
|
|
|
|
END
|
|
|
|
STATIC PUBLIC FUNCTION ToString(type AS Integer) AS String
|
|
|
|
SELECT CASE type
|
|
|
|
CASE XmlRpc.xInteger
|
|
RETURN "int"
|
|
CASE XmlRpc.xBoolean
|
|
RETURN "boolean"
|
|
CASE XmlRpc.xDouble
|
|
RETURN "double"
|
|
CASE XmlRpc.xString
|
|
RETURN "string"
|
|
CASE XmlRpc.xBase64
|
|
RETURN "base64"
|
|
CASE XmlRpc.xDate
|
|
RETURN "dateTime.iso8601"
|
|
CASE XmlRpc.xStruct
|
|
RETURN "struct"
|
|
CASE XmlRpc.xArray
|
|
RETURN "array"
|
|
|
|
END SELECT
|
|
|
|
RETURN ""
|
|
|
|
END
|
|
|
|
|
|
|