summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Murray <scott.murray@konsulko.com>2019-12-29 16:38:14 -0500
committerScott Murray <scott.murray@konsulko.com>2019-12-29 16:40:39 -0500
commitf525733f195051fdf82222b27d9408afa30bb064 (patch)
tree831ec6d29eba7d1e33d151d375c084fea2bc6140
parentaa6b53c6a1f1a2e138a95f24795f767d6a15d31e (diff)
voice: add vendor name to voiceagent model
Add the vendor name to the voiceagent model to allow using it applications, and fixed a typo and a couple of possible state name omissions. Bug-AGL: SPEC-2981 Signed-off-by: Scott Murray <scott.murray@konsulko.com> Change-Id: I65a59ec17d0e003bc114fa85d120ee773fee0f1a
-rw-r--r--voice/voiceagentmodel.cpp3
-rw-r--r--voice/voiceagentmodel.h1
-rw-r--r--voice/voiceagentprofile.cpp2
-rw-r--r--voice/voiceagentregistry.h2
4 files changed, 7 insertions, 1 deletions
diff --git a/voice/voiceagentmodel.cpp b/voice/voiceagentmodel.cpp
index 3f4f50d..90ddf01 100644
--- a/voice/voiceagentmodel.cpp
+++ b/voice/voiceagentmodel.cpp
@@ -52,6 +52,8 @@ QVariant VoiceAgentModel::data(const QModelIndex &index, int role) const
return readLoginParams(index);
case ActiveRole:
return vap->isactive()? "active" : "inactive";
+ case VendorRole:
+ return vap->vendor();
}
return ret;
}
@@ -216,5 +218,6 @@ QHash<int, QByteArray> VoiceAgentModel::roleNames() const
roles[DialogStateRole] = "dialogstate";
roles[LoginParamsRole] = "usrauth";
roles[ActiveRole] = "active";
+ roles[VendorRole] = "vendor";
return roles;
}
diff --git a/voice/voiceagentmodel.h b/voice/voiceagentmodel.h
index 3cd84e6..0be9637 100644
--- a/voice/voiceagentmodel.h
+++ b/voice/voiceagentmodel.h
@@ -38,6 +38,7 @@ class VoiceAgentModel : public QAbstractListModel
DialogStateRole,
LoginParamsRole,
ActiveRole,
+ VendorRole,
};
VoiceAgentModel(QObject *parent = Q_NULLPTR);
diff --git a/voice/voiceagentprofile.cpp b/voice/voiceagentprofile.cpp
index 05e3839..43d8b34 100644
--- a/voice/voiceagentprofile.cpp
+++ b/voice/voiceagentprofile.cpp
@@ -25,7 +25,7 @@ VoiceAgentProfile::VoiceAgentProfile(const QString &name,
const QString &wuws)
: m_name(name), m_vaid(id), m_vaapi(api), m_active(active),
m_activewuw(wuw), m_vendor(vendor), m_wuws(wuws),
- m_authstate("UNITIALIZED"), m_connstate("DISCONNECTED"),
+ m_authstate("UNINITIALIZED"), m_connstate("DISCONNECTED"),
m_dialogstate("MICROPHONEOFF"), m_logincode(QString()),
m_loginurl(QString()), m_expired(true)
{
diff --git a/voice/voiceagentregistry.h b/voice/voiceagentregistry.h
index cd7dc2c..e0a48c5 100644
--- a/voice/voiceagentregistry.h
+++ b/voice/voiceagentregistry.h
@@ -51,6 +51,8 @@ class VoiceAgentRegistry : public QObject
enum ServiceAuthState {
UNINITIALIZED = 0,
REFRESHED,
+ EXPIRED,
+ UNRECOVERABLE_ERROR
};
Q_ENUM(ServiceAuthState)