~ubuntu-branches/ubuntu/trusty/ginkgocadx/trusty

« back to all changes in this revision

Viewing changes to src/cadxcore/commands/cloudcommand.h

  • Committer: Package Import Robot
  • Author(s): Dmitry Smirnov
  • Date: 2013-07-21 11:58:53 UTC
  • mfrom: (7.2.1 sid)
  • Revision ID: package-import@ubuntu.com-20130721115853-44e7n1xujqglu78e
Tags: 3.4.0.928.29+dfsg-1
* New upstream release [July 2013]
  + new B-D: "libjsoncpp-dev".
  + new patch "unbundle-libjsoncpp.patch" to avoid building bundled
    "libjsoncpp-dev".
  + new patch "fix-wx.patch" to avoid FTBFS due to missing
    "-lwx_gtk2u_html-2.8".
* Removed unnecessary versioned Build-Depends.
* Removed obsolete lintian override.
* Reference get-orig-source implementation for orig.tar clean-up and
  DFSG-repackaging.
* Upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
*  
 
3
*  $Id: cloupuploadcommand.h $
 
4
*  Ginkgo CADx Project
 
5
*
 
6
*  Copyright 2008-12 MetaEmotion S.L. All rights reserved.
 
7
*  http://ginkgo-cadx.com
 
8
*
 
9
*  This file is licensed under LGPL v3 license.
 
10
*  See License.txt for details
 
11
*
 
12
*/
 
13
#pragma once
 
14
#include <api/globals.h>
 
15
#include <api/icommand.h>
 
16
#include <api/dicom/idicom.h>
 
17
#include <vector>
 
18
 
 
19
namespace GNC {
 
20
        namespace GCS {
 
21
                class CloudCommandParams : public ::GNC::GCS::IComandoParams {
 
22
 
 
23
                public:
 
24
 
 
25
                        typedef enum ActionType {
 
26
                                CC_GET,
 
27
                                CC_FIND
 
28
                        } ActionType;
 
29
 
 
30
                protected:
 
31
 
 
32
                        CloudCommandParams(ActionType action);
 
33
                        ~CloudCommandParams();
 
34
 
 
35
                public:
 
36
                        const ActionType m_action;
 
37
                        
 
38
 
 
39
                public:
 
40
                        std::string m_error;
 
41
                };
 
42
 
 
43
                class CloudGetCommandParams : public CloudCommandParams {
 
44
                public:
 
45
 
 
46
                        CloudGetCommandParams(const std::string& url, bool base64);
 
47
                        ~CloudGetCommandParams();
 
48
 
 
49
                        std::string m_url;
 
50
                        std::string m_baseDir;
 
51
                };
 
52
 
 
53
                class CloudFindCommandParams : public CloudCommandParams {
 
54
                public:
 
55
 
 
56
                        typedef std::map<std::string, std::string> ResultTuple;
 
57
                        typedef std::list<ResultTuple> Results;
 
58
 
 
59
                        CloudFindCommandParams(const std::string& bucketId, const std::string& userNameQuery, const std::string& descriptionQuery, const std::string& modalitiesQuery, const std::string& fromDateQuery, const std::string& toDateQuery);
 
60
                        ~CloudFindCommandParams();
 
61
 
 
62
                        const std::string m_bucketId;
 
63
                        const std::string m_userNameQuery;
 
64
                        const std::string m_descriptionQuery;
 
65
                        const std::string m_modalitiesQuery;
 
66
                        const std::string m_fromDateQuery;
 
67
                        const std::string m_toDateQuery;
 
68
 
 
69
                        Results m_pResults;
 
70
                        
 
71
                };
 
72
 
 
73
 
 
74
                class CloudCommand : public GNC::GCS::IComando {
 
75
                public:
 
76
                        CloudCommand(::GNC::GCS::CloudCommandParams* pParams);
 
77
 
 
78
                protected:
 
79
                        virtual void Execute();
 
80
                        virtual void Update();
 
81
 
 
82
                private:
 
83
                        void doGet(GNC::GCS::CloudGetCommandParams* pParams);
 
84
                        void doFind(GNC::GCS::CloudFindCommandParams* pParams);
 
85
 
 
86
                public:
 
87
 
 
88
                        ::GNC::GCS::CloudCommandParams* m_pCloudParams;
 
89
                };
 
90
        }
 
91
}
 
 
b'\\ No newline at end of file'