All Classes Files Functions Variables Enumerations Enumerator Groups Pages
ProductRegistration.idl
Go to the documentation of this file.
1 /**
2  * @file ProductRegistration.idl
3  * @brief Registration from the product
4  *
5  * @author Dusan Juhas, Jakub Zeman, Slavoj Pisek
6  *
7  * Copyright © 2011-2012 Kerio Technologies s.r.o.
8  */
9 #import <kerio/web/idl/SharedStructures.idl>
10 
11  module kerio {
12  module web {
13 
14 /**
15  * @brief a date structure
16  */
17 struct RegDate {
18  long year; ///< year
19  long month; ///< 1-12
20  long day; ///< 1-31 max day is limited by month
21 };
22 
23  /**
24  * @brief Registration Number info
25  */
27  string key; ///< Registration number
28  string type; ///< A type of the reg. number (base id, addon...)
29  string description; ///< A description of the reg. number.
30 };
31 
32 
33 /**
34  * @brief A list of strings
35  **/
36 typedef sequence<string> RegStringList;
37 
38 /**
39  * @brief An answer for survey questions
40  */
41 struct SurveyAnswer {
42  string questionID; ///< ID of the question
43  string answer; ///< answer to the question
44 };
45 
46 /**
47  * @brief a list of answers for survey questions
48  */
49 typedef sequence<SurveyAnswer> SurveyAnswerList;
50 
51 
52 /**
53  * @brief A list of registration numbers related to a registration.
54  */
55 typedef sequence<RegistrationNumber> RegistrationNumberList;
56 
57 /**
58  * @brief Extension information
59  */
60 struct Extension {
61  string name; ///< extension name
62 };
63 
64 /**
65  * @brief A list of extensions related to a registration.
66  */
67 typedef sequence<Extension> ExtensionList;
68 
69 
70 /**
71  * @brief Details about the license's owner
72  */
73 struct LicenseDetail {
74  string organization; ///< compulsory
75  string person; ///< compulsory
76  string email; ///< compulsory
77  string phone; ///< compulsory
78  string web;
79  string country; ///< compulsory
80  string state; ///< compulsory for countries such as USA, Canada, Australia etc.
81  string city; ///< compulsory
82  string street; ///< compulsory
83  string zip; ///< compulsory
84  string comment;
85 };
86 
87 
88 /**
89  * @brief The data related to a registration. Content of the structure is obtained
90  * from our registration server by method getRegistrationInfo, modified by client and sent back
91  * to the server by method finishRegistration
92  *
93  * @see getRegistrationInfo, finishRegistration
94  */
95 struct Registration {
96  LicenseDetail details; ///< Information about user
97  RegDate expirationDate; ///< Expiration date
98  long subscribers; ///< A count of Subscribers (typically users) of the product
99  boolean showQuestions; ///< Have to show questions?
100  long registrationType; ///< is it edu/gov registration?
101  string eduInfo; ///< information special for EDUcational type of organization
102  RegistrationNumberList regNumbers; ///< All registration numbers included in registration
103  SurveyAnswerList surveyAnswers; ///< Survey answers - Answers should be sent in the same order as the questions are displayed.
104  ExtensionList extensions; ///< list of extensions
105 };
106 
107 /**
108  * Type of registration finish
109  **/
110 enum RegistrationFinishType {
111  rfCreate, ///< Create a new registration
112  rfModify, ///< Modify existing Registration
113  rfDownload, ///< Download license key without any modification
114  rfStore ///< Just store in product without downloading key and modifying reg. (trial)
115 };
116 
117 /**
118  * A type of the current registration of the product
119  */
120 enum RegistrationType {
121  rsNoRegistration, ///< The product has not been registered yet
122  rsTrialRegistered, ///< The product has a valid trial registration
123  rsTrialExpired, ///< The product has a trial registration but it has expired!
124  rsProductRegistered ///< The product has been registered.
125 };
126 
127 
128 /**
129  * A registration Status of the current product.
130  */
132  RegistrationType regType; ///< The registration type of the current prooduct
133  string Id; ///< Base or trial ID used for registration
134 };
135 
136 
137 /**
138  * Type of expiration
139  */
140 enum ExpireType {
141  License, ///< License
142  Subscription ///< Subscription
143 };
144 
145 
146 /**
147  * Expire date information
148  */
149 struct ExpireInfo {
150  ExpireType type; ///< type of expiration
151  boolean isUnlimited; ///< is it a special license with expiration == never ?
152  long remainingDays; ///< days remaining to subscription expiration
153  long date; ///< last date of subscription
154 };
155 
156 
157 /**
158  * All expiration dates information in license
159  */
160 typedef sequence<ExpireInfo> LicenseExpireInfo;
161 
162 
163 /**
164  * Full status information
165  */
167  RegistrationType regType; ///< The registration type of the current prooduct
168  string Id; ///< Base or trial ID used for registration
169  string company; ///< Company name
170  long users; ///< Users count
171  LicenseExpireInfo expirations; ///< sequence of expire information
172 };
173 
174 
175 /**
176  * @brief Class provides an interface for both standard and trial registration
177  * process of Kerio products
178  *
179  * (Trial) registration begins with calling method startRegistration().
180  * The method returns a token (for identifying registration session) and
181  * a "security" picture.
182  * A code from the picture and the token are sent back to server as argument
183  * of method get() together with a registration number.
184  * If the reg. number already exists in the system the server sends back
185  * License details which could be displayied by the wizard.
186  * As step 3 the wizard offers a user interface for adding new registration
187  * numbers. A new number can be verified by method verifyRegistrationNumber().
188  * The registration can be finished by method finish().
189  */
191 
192  /**
193  * The Method finishes registration and installs the valid licenseKey.
194  *
195  * @param token - ID of wizard's session
196  * @param baseId - Base ID of registration
197  * @param registrationInfo - Registration data retrieved from server by getRegistrationInfo() and modified by user.
198  * @param finishType - how to finish the registration? Create a new one, modyfy an existing or just download an existing license?
199  */
200  void finish(in string token, in string baseId, in Registration registrationInfo, in RegistrationFinishType finishType);
201 
202  /**
203  * Retrieves existing registration data from the server.
204  *
205  * @param registrationInfo - the registration data related to the license ID
206  * @param newRegistration - flag indicates whether the registration has already existed.
207  * @param token - ID of wizard's session
208  * @param securityCode - a code number from the security immage
209  * @param baseId - license ID
210  * @param trial - trial ID registered on web, do not display registrationInfo and finish immediatelly
211  */
212  void get(out Registration registrationInfo, out boolean newRegistration, in string token, in string securityCode, in string baseId, out boolean trial);
213 
214  /**
215  * The function checks what kind of registration should be offered to the user.
216  *
217  * @param status - A current registration status of the product.
218  * @see RegistrationFullStatus
219  */
220  void getFullStatus(out RegistrationFullStatus status);
221 
222  /**
223  * The function checks what kind of registration should be offered to the user.
224  *
225  * @param status - Current registration status of the product.
226  * @see RegistrationStatus
227  */
228  void getStatus(out RegistrationStatus status);
229 
230  /**
231  * Starts registration process. Methods connect to a server and obtain an identification token and a security image.
232  *
233  * @param token - ID of wizard's session
234  * @param image - URL of the image with the security code
235  * @param showImage - show captcha image in wizard if true
236  * @param langId - language id
237  */
238  void start(out string token, out string image, out boolean showImage, in string langId);
239 
240  /**
241  * Function checks whether a registration number can be added to the registration with the BaseId.
242  *
243  * It may happen that the nummber is OK, but the registration cannot be finished without adding some other registration numbers.
244  * In that case parameter allowFinish is set to false and admin must disable wizards "next" button to avoid finishing
245  * an uncomplete registration.
246  *
247  * @param errors - description of an error in case of failure
248  * @param regNumberInfo - information related to given registration key(s)
249  * @param allowFinish - if false, the number is OK, but the registration cannot be finished without adding some other numbers.
250  * @param users - the count of users connected to the license
251  * @param expirationDate - licence expiration date
252  * @param token - ID of wizard's session
253  * @param baseId - Registration's baseId
254  * @param regNumbersToVerify - a list of numbers to be verified
255  */
256  void verifyNumber(out ErrorList errors, out RegistrationNumberList regNumberInfo, out boolean allowFinish, out long users, out RegDate expirationDate, in string token, in string baseId, in RegStringList regNumbersToVerify);
257 };
258 
259 }; // module web
260 }; // module kerio