 xml2js     = require 'xml2js'
 express    = require 'express'
 async      = require 'async'
+base64     = require 'base64'
 
 # ### 接口地址
 #

                else res.ok()

            # 收到图片、语音、视频、地理位置、链接时，如注册了处理句柄，使用该句柄处理：
            when 'image', 'voice', 'video', 'location', 'link'
              async.eachSeries (@["#{msg_type}_handlers"] or []), (handler, callback) ->
                handler req, res, callback
              , (err) ->

    # ### 注册链接处理句柄
    link: (@link_handlers...) => @

    # ### 注册设备消息处理句柄
    device: (@device_text_handlers...) => @

    # ### 注册关注与取消关注处理句柄
    subscribe   :   (@subscribe_handlers...) => @
    unsubscribe : (@unsubscribe_handlers...) => @
