summaryrefslogtreecommitdiff
path: root/user.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'user.cpp')
-rw-r--r--user.cpp42
1 files changed, 20 insertions, 22 deletions
diff --git a/user.cpp b/user.cpp
index ea2880b..d3457b8 100644
--- a/user.cpp
+++ b/user.cpp
@@ -1,31 +1,29 @@
#include "user.h"
-namespace plexclient
-{
+namespace plexclient {
-user::user(std::istream *response)
-{
- try {
- InputSource src(*response);
- DOMParser parser;
- Poco::XML::AutoPtr<Document> pDoc = parser.parse(&src);
+ user::user(std::istream *response) {
+ try {
+ InputSource src(*response);
+ DOMParser parser;
+ Poco::XML::AutoPtr<Document> pDoc = parser.parse(&src);
- NodeIterator it(pDoc, Poco::XML::NodeFilter::SHOW_ALL);
- Node* pNode = it.nextNode();
+ NodeIterator it(pDoc, Poco::XML::NodeFilter::SHOW_ALL);
+ Node *pNode = it.nextNode();
- while(pNode) {
- if(Poco::icompare(pNode->nodeName(),"authentication-token") == 0) {
- pNode = it.nextNode();
- authenticationToken = pNode->nodeValue();
- break;
- }
- pNode = it.nextNode();
- }
+ while (pNode) {
+ if (Poco::icompare(pNode->nodeName(), "authentication-token") == 0) {
+ pNode = it.nextNode();
+ authenticationToken = pNode->nodeValue();
+ break;
+ }
+ pNode = it.nextNode();
+ }
- } catch(Exception &exc) {
- std::cerr << exc.displayText() << std::endl;
- }
+ } catch (Exception &exc) {
+ std::cerr << exc.displayText() << std::endl;
+ }
-}
+ }
}