2,853
社区成员




void SetupAboutData(AboutData &aboutData)
{
// Setup the about data
// The default language is specified in the constructor. If the default language
// is not specified any Field that should be localized will return an error
//AppId is a 128bit uuid
uint8_t appId[] = { 0x01, 0xB3, 0xBA, 0x14,
0x1E, 0x82, 0x11, 0xE4,
0x86, 0x51, 0xD1, 0x56,
0x1D, 0x5D, 0x46, 0xB0 };
QStatus status = aboutData.SetAppId(appId, 16);
status = aboutData.SetDeviceName("My Device Name");
//DeviceId is a string encoded 128bit UUID
status = aboutData.SetDeviceId("93c06771-c725-48c2-b1ff-6a2a59d445b8");
status = aboutData.SetAppName("Application");
status = aboutData.SetManufacturer("Manufacturer");
status = aboutData.SetModelNumber("123456");
status = aboutData.SetDescription("A poetic description of this application");
status = aboutData.SetDateOfManufacture("2014-03-24");
status = aboutData.SetSoftwareVersion("0.1.2");
status = aboutData.SetHardwareVersion("0.0.1");
status = aboutData.SetSupportUrl("http://www.example.org");
// The default language is automatically added to the `SupportedLanguages`
// Users don't have to specify the AJSoftwareVersion its automatically added
// to the AboutData
// Adding Spanish Localization values to the AboutData. All strings MUST be
// UTF-8 encoded.
//本地化必须要以下4个域
/*
status = aboutData.SetDeviceName("Mi dispositivo Nombre", "es");
status = aboutData.SetAppName("aplicación", "es");
status = aboutData.SetManufacturer("fabricante", "es");
status = aboutData.SetDescription("Una descripción poética de esta aplicación", "es");
*/
// Check to see if the aboutData is valid before sending the About Announcement
if (!aboutData.IsValid()) {
printf("failed to setup about data.\n");
}
}