- case OCREP_PROP_NULL:
- std::cout << " Value: None" << std::endl;
- break;
- case OCREP_PROP_INT:
- std::cout << " Value: " << value->i << std::endl;
- break;
- case OCREP_PROP_DOUBLE:
- std::cout << " Value: " << value->d << std::endl;
- break;
- case OCREP_PROP_BOOL:
- std::cout << " Value: " << value->b << std::endl;
- break;
- case OCREP_PROP_STRING:
- std::cout << " Value: " << value->str << std::endl;
- break;
- case OCREP_PROP_BYTE_STRING:
- std::cout << " Value: Byte String" << std::endl;
- break;
- case OCREP_PROP_OBJECT:
- std::cout << " Value: Object" << std::endl;
- break;
- case OCREP_PROP_ARRAY:
- std::cout << " Value: Array" << std::endl;
- break;
- }
-
- if (strcmp(value->name, "accesstoken") == 0)
- {
- g_accesstoken = value->str;
+ switch (itr->base_type())
+ {
+ case AttributeType::OCRepresentation:
+ for (auto itr2 : (*itr).getValue<vector<OCRepresentation> >())
+ {
+ printRepresentation(itr2);
+ }
+ break;
+
+ case AttributeType::Integer:
+ for (auto itr2 : (*itr).getValue<vector<int> >())
+ {
+ cout << "\t\t" << itr2 << endl;
+ }
+ break;
+
+ case AttributeType::String:
+ for (auto itr2 : (*itr).getValue<vector<string> >())
+ {
+ cout << "\t\t" << itr2 << endl;
+ }
+ break;
+
+ default:
+ cout << "Unhandled base type " << itr->base_type() << endl;
+ break;
+ }