Files
harbour-core/contrib/hbamf
Przemysław Czerpak d55d57c622 2013-06-10 16:59 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/gtwvt/gtwvt.c
    * removed not longer user K_Ctrl[] array

  * contrib/gtqtc/gtqtc1.cpp
    ! fixed MT protection to work with recursive calls
      (such call can appear after ALT+ENTER)

  * doc/xhb-diff.txt
    * updated "HASH ARRAYS" paragraph

  * config/lang2po.hb
  * contrib/hbamf/amfdec.c
  * contrib/hbamf/amfenc.c
  * contrib/hbexpat/tests/tohash.prg
  * contrib/hbmxml/core.c
  * contrib/hbnetio/utils/hbnetio/hbnetio.prg
  * contrib/hbnetio/utils/hbnetio/netiomgm.hb
  * contrib/hbwin/hbolesrv.c
  * contrib/hbwin/tests/olesrv1.prg
  * contrib/hbwin/tests/olesrv2.prg
  * contrib/make.hb
  * contrib/xhb/xhbhasha.c
  * src/rtl/hbdoc.prg
  * src/rtl/hbini.prg
  * src/rtl/hbjson.c
  * tests/big5_gen.prg
  * tests/uc16_gen.prg
  * utils/hbmk2/hbmk2.prg
    * removed keeporder setting - now it's default for newly
      created hash arrays

  * contrib/gtwvg/gtwvg.hbx
    * added missing functions
2013-06-10 16:59:13 +02:00
..

--------------------------------------
Short description of Harbour functions
--------------------------------------

   cAMF := amf3_Encode( xVal, symConvOut, lBinaryStrings )
   xVal           - any supported datatype:
                    Character (String/MEMO), Numeric (Integer/Double), NIL, Logical, Date (encoded as DateTime),
                    DateTime, Array, Hash (String and Integer keys only),
                    Object (anonymous hash-like, externalizable, class-mapped)

                    AMF supports references, so this example a1 value will be serialized correctly.
                      a1 := { NIL }
                      a2 := { a1 }
                      a1[ 1 ] := a2

   symConvOut     - function symbol for outbound conversion
                    Acts recursively, so if xVal is array,
                    all of it's values will be passed to this
                    function.

   lBinaryStrings - treat strings as binary, resulting AMF
                    datatype will be ByteArray. Normally
                    a string is encoded to UTF-8.

   xVal := amf3_Decode( cAMF, symConvIn )
   cAMF           - AMF3 serialized binary string
   symConvIn      - function symbol for inbound conversion

   cAMF := amf3_FromWA( [ <bWhile> ], [ <bFor> ], [ <aFields> ], [ <nCount> ], [ <lStrTrim> ], [ <nPackage> ], [ pContext ] )

   Function to convert current workarea to AMF3 Array.

   bWhile   - COPY TO like WHILE codeblock
   bFor     - COPY TO like FOR codeblock
   aFields  - array of fieldnames (codeblocks are going to be supported here too)
   nCount   - NEXT like, process only specified count of records
   lStrTrim - RTrim() strings, default is .T.

   nPackage - determine the exact output AMF format
              0 - Array of records contains Arrays of fields (default)
              1 - Array of records contains Anonymous objects
              2 - ArrayCollection object
              Lower number means lesser packet size on the network.

   pContext - when this function is used inside AMF3_ENCODE specified
              outbound conversion function, you must pass pointer to
              encoding context, otherwise AMF3 references will encoded
              incorrectly. Example code of such case:
              STATIC FUNCTION ConvOut( xVal, pOuterContext )
                 LOCAL lClose

                 IF HB_ISOBJECT( xVal )
                     IF xVal:className() == "WORKAREAEXPORT"
                       lClose := xVal:lCloseWA
                       SELECT ( xVal:nWorkArea )

                       xVal := amf_Raw():New( amf3_FromWA( xVal:bWhile, xVal:bFor, xVal:aFields, xVal:nCount, xVal:lStrTrim, 1, pOuterContext ) )
                       IF lClose
                          CLOSE
                       ENDIF
                    ENDIF
                 ENDIF

              RETURN xVal