本文整理汇总了C++中InterfaceDescription::AddPropertyAnnotation方法的典型用法代码示例。如果您正苦于以下问题:C++ InterfaceDescription::AddPropertyAnnotation方法的具体用法?C++ InterfaceDescription::AddPropertyAnnotation怎么用?C++ InterfaceDescription::AddPropertyAnnotation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类InterfaceDescription
的用法示例。
在下文中一共展示了InterfaceDescription::AddPropertyAnnotation方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: BuildInterface
static QStatus BuildInterface(BusAttachment& bus)
{
QStatus status;
InterfaceDescription* intf = NULL;
status = bus.CreateInterface(INTF_NAME, intf);
QCC_ASSERT(ER_OK == status);
status = intf->AddProperty("IsOpen", "b", PROP_ACCESS_READ);
QCC_ASSERT(ER_OK == status);
status = intf->AddPropertyAnnotation("IsOpen", "org.freedesktop.DBus.Property.EmitsChangedSignal", "true");
QCC_ASSERT(ER_OK == status);
status = intf->AddProperty("Location", "s", PROP_ACCESS_READ);
QCC_ASSERT(ER_OK == status);
status = intf->AddPropertyAnnotation("Location", "org.freedesktop.DBus.Property.EmitsChangedSignal", "true");
QCC_ASSERT(ER_OK == status);
status = intf->AddProperty("KeyCode", "u", PROP_ACCESS_READ);
QCC_ASSERT(ER_OK == status);
status = intf->AddPropertyAnnotation("KeyCode", "org.freedesktop.DBus.Property.EmitsChangedSignal", "invalidates");
QCC_ASSERT(ER_OK == status);
status = intf->AddMethod("Open", "", "", "");
QCC_ASSERT(ER_OK == status);
status = intf->AddMethod("Close", "", "", "");
QCC_ASSERT(ER_OK == status);
status = intf->AddMethod("KnockAndRun", "", "", "", MEMBER_ANNOTATE_NO_REPLY);
QCC_ASSERT(ER_OK == status);
status = intf->AddMethod("GetUI", "", "s", "outStr", 0);
QCC_ASSERT(ER_OK == status);
status = intf->AddMethod("CallFunc", "s", "s", "in", 0);
QCC_ASSERT(ER_OK == status);
status = intf->AddSignal("PersonPassedThrough", "s", "name", MEMBER_ANNOTATE_SESSIONCAST);
QCC_ASSERT(ER_OK == status);
intf->Activate();
return status;
}