dbus_props.py 文件源码

python
阅读 18 收藏 0 点赞 0 评论 0

项目:oacids 作者: openaps 项目源码 文件源码
def _reflect_on_dict(cls, props):
        reflection_data = ''
        for name, prop in props.items( ):
          value = prop
          type_sig = cls.PROP_SIGS.get(name, 'v')
          access_map = {
            gobject.PARAM_READWRITE: 'readwrite'
          , gobject.PARAM_READABLE: 'read'
          , gobject.PARAM_WRITABLE: 'write'
          }
          access = 'readwrite'
          reflection_data += '    <property name="%s" type="%s" access="%s">\n' % (name, type_sig, access)
          for annotation in getattr(prop, '_dbus_annotations', [ ]):
              reflection_data += '      <annotation name="%s" value="true" />\n' % pair
              # reflection_data += '      <arg direction="in"  type="%s" name="%s" />\n' % pair

          reflection_data += '    </property>\n'

        return reflection_data
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号