16 #include "iberbox/config.h" 22 #include "iberbox/crash.h" 25 #include <scapix/bridge/object.h> 39 :
public scapix::bridge::object<IberboxSettings>
89 std::string mWorkingDirectory;
93 std::string mUserAgent;
110 class CallbackDispatcher;
131 SORT_ORDER_SIZE_R = -6,
154 LOG_LEVEL_CRITICAL = 5,
160 AES256_CRYPTO_SCHEME = 0,
161 AES128_CRYPTO_SCHEME = 2
169 static void globalInit(
const std::string &appId,
int appVersion);
173 static void globalCleanup();
179 static void enableCrashHandler(std::function<
void (std::string, std::string)> callback);
193 static void setLogLevel(
int logLevel);
207 static int getLogLevel();
261 void verifyEmail(
const std::string &email,
const std::string &firstName,
const std::string &lastName,
ActionListenerType listener =
nullptr);
287 void createAccount(
const std::string ®istrationId,
const std::string &name,
const std::string &lastName,
288 const std::string &email,
const std::string &password,
316 void createAccountWithCoupon(
const std::string ®istrationId,
const std::string &name,
const std::string &lastName,
317 const std::string &email,
const std::string &password,
int pin,
const std::string &coupon,
347 void createAccountWithPlan(
const std::string ®istrationId,
const std::string &name,
const std::string &lastName,
348 const std::string &email,
const std::string &password,
int pin,
const std::string &coupon,
int planId,
367 void createAccountForCurrentUser(
const std::string &coupon,
ActionListenerType listener =
nullptr);
403 void changePassword(
const std::string &password,
ActionListenerType listener =
nullptr);
483 void login2fa(
const std::string &login,
const std::string &password,
int code,
ActionListenerType listener =
nullptr);
541 void loginIntoAccount2fa(
const std::string &login,
const std::string &password,
int code,
AccountHandle accountHandle,
ActionListenerType listener =
nullptr);
561 void login(
const std::string &login,
const std::string &password,
ActionListenerType listener =
nullptr);
575 void checkPassword(
const std::string &password,
ActionListenerType listener =
nullptr);
589 void resumeSession(
const std::string &session,
ActionListenerType listener =
nullptr);
638 void recoverAccount(
const std::string &recoveryId,
const std::string &login,
const std::string &recoveryKey,
int pin,
ActionListenerType listener =
nullptr);
658 void recoverAccount2fa(
const std::string &recoveryId,
const std::string &login,
const std::string &recoveryKey,
int pin,
int code,
ActionListenerType listener =
nullptr);
1053 void createSecret(
const std::string &name,
const std::string &password,
ActionListenerType listener =
nullptr);
1069 void openSecret(
const std::string &name,
const std::string &password,
ActionListenerType listener =
nullptr);
1100 void updateSecret(
NodeHandle secretHandle,
const std::string &name,
const std::string &password,
ActionListenerType listener =
nullptr);
1134 void recoverSecret(
const std::string &recoveryKey,
const std::string &newName,
const std::string &newPassword,
ActionListenerType listener =
nullptr);
1292 void getPublicAccountInfoByLink(
const std::string &link,
ActionListenerType listener =
nullptr);
1316 void setAccountCryptoScheme(
int cryptoScheme,
ActionListenerType listener =
nullptr);
1336 void setInvoicingAddress(
const std::string &companyName,
const std::string &companyAddress,
const std::string &companyAddress2,
1366 void downloadInvoice(
int invoiceId,
const std::string &path,
ActionListenerType listener =
nullptr);
1413 void logEventData(
int eventId,
const std::string &message,
ActionListenerType listener =
nullptr);
1429 void testProxy(
const std::string &url,
const std::string &user,
1472 void setAuthProxy(
const std::string &url,
const std::string &user,
1507 void uploadWithCustomData(
const std::string &file,
NodeHandle parent,
const std::string &customData,
ActionListenerType listener =
nullptr);
1540 void downloadWithCustomData(
NodeHandle node,
const std::string &parent,
const std::string &customData,
ActionListenerType listener =
nullptr);
1556 void downloadLink(
const std::string &link,
const std::string &parent,
ActionListenerType listener =
nullptr);
1573 void downloadLinkWithCustomData(
const std::string &link,
const std::string &parent,
const std::string &customData,
ActionListenerType listener =
nullptr);
1606 void downloadZipWithCustomData(
NodeHandle node,
const std::string &parent,
const std::string &customData,
ActionListenerType listener =
nullptr);
1667 void getTransfersByStatus(
int type,
int status,
ActionListenerType listener =
nullptr);
1837 void readLink(
const std::string &link,
unsigned long startPositon,
unsigned long size,
ActionListenerType listener =
nullptr);
1890 void downloadPublicMetadata(
const std::string &metadataInfo,
int metadataType,
const std::string &parent,
ActionListenerType listener =
nullptr);
1950 void getDeviceByName(
const std::string &name,
ActionListenerType listener =
nullptr);
2104 void createBackup(
const std::string &name,
unsigned long startTime,
const std::string cronExpr,
const std::string &localPath,
2195 void modifyBackup(
NodeHandle backupId,
const std::string &name,
unsigned long startTime,
const std::string cronExpr,
const std::string &localPath,
2363 void getNextSnapshotsForSchedule(
unsigned long startTime,
const std::string cronExpr,
int count,
ActionListenerType listener =
nullptr);
2441 void createInbox(
const std::string &name,
const std::string &message,
ActionListenerType listener =
nullptr);
2474 void getInboxInfo(
const std::string &inboxLink,
ActionListenerType listener =
nullptr);
2503 void startRecord(
const std::string &inboxLink,
ActionListenerType listener =
nullptr);
2518 void resumeRecord(
const std::string &newRecordLink,
ActionListenerType listener =
nullptr);
2535 void setRecordInfo(
const std::string &contactInfo,
const std::string &subject,
const std::string &message,
ActionListenerType listener =
nullptr);
2554 void setEmailRecordInfo(
const std::string &from,
const std::string &to,
const std::string &subject,
const std::string &message,
ActionListenerType listener =
nullptr);
2612 void finishRecordWithRecipient(
const std::string &recipient,
ActionListenerType listener =
nullptr);
2642 void getRecordInfo(
const std::string &recordLink,
ActionListenerType listener =
nullptr);
2692 void getSubscriptionOptionsWithFeatures(
int features,
ActionListenerType listener =
nullptr);
2748 void loginLink(
const std::string &folderLink,
ActionListenerType listener =
nullptr);
2782 void generateUpdate(
const std::string &appName,
int version,
2783 const std::string &platform,
const std::string &updateFolder,
2784 const std::string &updateUrl,
const std::string &changelog,
2785 const std::string &outputFile,
const std::string &privateKey,
2802 void checkUpdate(
const std::string &appName,
int version,
ActionListenerType listener =
nullptr);
2819 void downloadUpdate(
const std::string &appName,
int version,
const std::string &downloadFolder,
const std::string &installFolder,
ActionListenerType listener =
nullptr);
2836 void installUpdate(
const std::string &appName,
int version,
const std::string &downloadFolder,
const std::string &installFolder,
ActionListenerType listener =
nullptr);
2883 void getCouponInfo(
const std::string &coupon,
ActionListenerType listener =
nullptr);
2913 void createResellerCoupon(
const std::string &email = std::string(),
ActionListenerType listener =
nullptr);
2930 void createResellerCouponWithPlan(
int planId,
const std::string &email = std::string(),
ActionListenerType listener =
nullptr);
2957 void addResellerCodeAsPaymentMethod(
const std::string &code,
ActionListenerType listener =
nullptr);
2972 void addDirectDebitAsPaymentMethod(
const std::string &iban,
const std::string &holder,
ActionListenerType listener =
nullptr);
3002 void createJoinLink(
const std::string &email,
ActionListenerType listener =
nullptr);
3023 void createJoinLinkWithAccessLevel(
const std::string &email,
int accessLevel,
ActionListenerType listener =
nullptr);
3045 void checkJoinLink(
const std::string &link,
const std::string &email,
ActionListenerType listener =
nullptr);
3091 void joinAccount(
AccountHandle account,
const std::string &accountKey,
const std::string ®istrationId,
3092 const std::string &name,
const std::string &lastName,
const std::string &email,
3198 void saveInbox(
NodeHandle contact,
const std::string &inboxLink,
const std::string &outboxName,
ActionListenerType listener =
nullptr);
3273 void createSharedDrive(
const std::string &name,
ActionListenerType listener =
nullptr);
3368 void shareDriveWithAccountByLinkWithAccessLevel(
NodeHandle sharedDrive,
const std::string &accountLink,
int accessLevel,
ActionListenerType listener =
nullptr);
3480 void verifyHash(
const std::string base64Hash,
const std::string filePath,
ActionListenerType listener =
nullptr);
3508 void sendCrashReport(
const std::string &file,
ActionListenerType listener =
nullptr);
3553 virtual void onActionFinish(
Action action)
override;
3559 static bool mInitialized;
3563 static std::string mAppId;
3567 static int mAppVersion;
3571 static CrashManager *mCrashManager;
3575 CallbackDispatcher *mCallbackDispatcher;
Definition: iberbox.h:132
std::string getWorkingDirectory()
Gets the working directory path.
The iberbox namespace.
Definition: task.h:21
Definition: iberbox.h:141
LogLevelType
Definition: iberbox.h:147
void setUserAgent(const std::string &userAgent)
Sets the user agent.
CryptoSchemeType
Definition: iberbox.h:158
uint64_t NodeHandle
Definition: node.h:26
Definition: iberbox.h:140
Definition: iberbox.h:133
Definition: iberbox.h:134
uint64_t AccountHandle
Definition: node.h:27
The IberboxSettings class.
Definition: iberbox.h:37
Definition: iberbox.h:142
IberboxSettings()
IberboxSettings default constructor.
virtual ~IberboxSettings()
IberboxSettings default destructor.
SortOrderType
The SortOrderType enum.
Definition: iberbox.h:129
void setWorkingDirectory(const std::string &path)
Sets the working directory.
The Task Manager class.
Definition: task.h:27
Definition: iberbox.h:135
std::shared_ptr< ActionData > Action
Definition: action.h:33
IberboxSettings * IberboxSettingsType
IberboxSettingsType.
Definition: iberbox.h:105
Definition: iberbox.h:136
std::string getUserAgent()
Gets the current user agent.
Definition: iberbox.h:139
Definition: iberbox.h:143
Definition: iberbox.h:138
The Action Listener class.
Definition: action.h:683
The Iberbox class.
Definition: iberbox.h:115
UserId UserHandle
Definition: user.h:34