#ifndef APPCLIENT_MAIN_H_
#define APPCLIENT_MAIN_H_
/*---------------------------------------------------------------------------*/
/* appclient_main.h                                                          */
/* copyright (c) innovaphone 2012                                            */
/*                                                                           */
/*---------------------------------------------------------------------------*/

NAMESPACE_BEGIN

class UAppClientMain : public UDebugLogFlags, public UDebugReadLog {
public:
    virtual void AppClientMainCertificate(const char * certString) = 0;
    virtual void AppClientMainListening(const char * urlToLoad, const char * webserverUrl, const char * startFixCertUrl) = 0;
    virtual void AppClientMainSetLanguageId(int languageId) = 0;
    virtual void AppClientMainRegistrationCheckConfirm() {};
    virtual void AppClientMainDisablePowerSaving(bool active) = 0;
    virtual void AppClientMainSetFocus(const char * app, const char * title) = 0;
    virtual void AppClientMainAppWindowOpened(const char * app, const char * title) = 0;
    virtual void AppClientMainSetResize(const char * app, int width, int height) = 0;
    virtual void AppClientMainSetOffline(int autoOffline) = 0;
    virtual void AppClientMainSetAutostart(bool autostart) = 0;
    virtual void AppClientMainSetShowDesktopNotifications(bool showDesktopNotifications) = 0;
    virtual void AppClientMainSetHotkey(int type, const char * hotkey) = 0;
    virtual void AppClientMainStartExternalApp(const char * app, const char * param) = 0;
    virtual void AppClientMainSetDocking(int docking) = 0;
    virtual void AppClientMainRegistrationState(bool up) = 0;
    virtual void AppClientMainDialGSM(const char * number) {};
    virtual void AppClientMainShowIfLocked(const char * ref, bool show) {};
    virtual void AppClientMainShowUnlock() {};
    virtual void AppClientMainAddLocalNotification(const char * ref, int type, const char * title, const char * text, const char * smallIcon, const char * largeIcon,
        const char * soundUrl, const char * buttonTitle, const char * acceptTitle, const char * rejectTitle, const char * link) = 0;
    virtual void AppClientMainRemoveLocalNotification(const char * ref) = 0;
    virtual void AppClientMainSoftwareUpdate() {};
    virtual void AppClientMainSetBadgeCount(const char * ref, unsigned count, const char * text) = 0;
    virtual void AppClientMainSetPushPassword(const char * pwd) {};
    virtual void AppClientMainPushNotifications(int mode) {};
    virtual void AppClientMainDetectWebcams(const char *context) {};
    virtual void AppClientMainStartWebcam(const char *id, const char *context, int width, int height, bool hdVideo) {};
    virtual void AppClientMainStopWebcam(const char *id) {};
    virtual void AppClientMainWebcamFullIntraRequest(const char *id) {};
    virtual void AppClientMainVideoTranscode(int id, dword timestamp, dword duration, short sequenceDiff, const void * buf, int len, int width, int height, int stride, dword flags, int from, int to) {};
    virtual void AppClientMainKeyboardEvent(int code, bool keyDown) {};
    virtual void AppClientMainMouseEvent(int x, int y, bool right, bool keyDown) {};
    virtual void AppClientMainMouseWheelEvent(bool direction) {};
    virtual void AppClientMainContactsSearch(const char * ref, const char * pattern) {};
    virtual void AppClientMainContactsLookup(const char * ref, const char * number, const char * prefixIntl, const char * prefixNtl, const char * prefixSubs, const char * areaCode, const char * countryCode) {};
    virtual void AppClientMainWebserverGet(const char * context, const char * resourceName) {};
    virtual void AppClientMainWebserverGetSent(const char * context) {};
    virtual void AppClientMainShutdown() = 0;
    virtual void AppClientMainEMailLog() = 0;
    virtual void AppClientMainClearLog() = 0;
    virtual void AppClientMainOrientationAdaptationOff(bool off) {};
    virtual void AppClientMainDisplayOnIfCharging(int displayOnIfCharging) {};
    virtual void AppClientMainStatusBarAppearance(bool hidden, bool blackText, dword color) {};
    virtual void AppClientMainBluetoothHeadsetMode(int bluetoothHeadsetMode) {};
    virtual void AppClientMainRingInHeadset(bool enable) {};
    virtual void AppClientMainAvoidNativeCallScreen(bool avoid) {};
    virtual void AppClientMainHideFromNativeCallList(bool hide) {};
    virtual void AppClientMainActiveAfterClose(bool active) {};
    virtual void AppClientMainActiveAfterCloseAsked(bool asked) {};
    virtual void AppClientMainCxUse(bool use, const char *ringtone, bool supportsVideo, int maximumCallGroups, int maximumCallsPerCallGroup) {};
    virtual void AppClientMainCxReportNewIncomingCall(const char *uuid, const char *number, const char *name, const char *transfer, const char *called,
        bool hasVideo, bool supportsDTMF, bool supportsHolding, bool supportsGrouping, bool supportsUngrouping) {};
    virtual void AppClientMainCxReportOutgoingCallConnecting(const char *uuid) {};
    virtual void AppClientMainCxReportOutgoingCallConnected(const char *uuid) {};
    virtual void AppClientMainCxReportCallUpdated(const char *uuid, const char *number, const char *name, const char *transfer, const char *called,
        bool hasVideo, bool supportsDTMF, bool supportsHolding, bool supportsGrouping, bool supportsUngrouping) {};
    virtual void AppClientMainCxReportCallEnded(const char *uuid, int reason) {};
    virtual void AppClientMainCxRequestStartCall(const char *uuid, const char *number, const char *name, bool video) {};
    virtual void AppClientMainCxRequestEndCall(const char *uuid) {};
    virtual void AppClientMainCxRequestSetHeldCall(const char *uuid, bool held) {};
    virtual void AppClientMainCxRequestSetMutedCall(const char *uuid, bool muted) {};
    virtual void AppClientMainCxRequestSetGroupCall(const char *uuid, const char *with) {};
    virtual void AppClientMainCxRequestPlayDTMF(const char *uuid, const char *digits) {};
    virtual void AppClientMainFixCert(const char * url, const byte * cert, size_t certLen) {};
    virtual int AppClientMainCertMobileconfig(byte * buf, const byte * cert, size_t certLen) { return 0; };
    virtual void AppClientMainStartAutostartSettingsApp(const char *name) {};
    virtual void AppClientMainStartScreenCapture() {};
    virtual void AppClientMainStopScreenCapture() {};
    virtual void AppClientMainRccAppConnected(bool up) = 0;
    virtual void AppClientMainSetConnInfo(bool up, bool standby, const char * cur, const char * pri, const char * sec, const char * master) {};
};

class IAppClientMain {
public:
    static int main(IIoMux * const iomux, UAppClientMain * const user, int argc, char *argv[]);
    static void CloseListen();
    static void RestartListen();
    static void CloseTcpSockets();
};

NAMESPACE_END

/*---------------------------------------------------------------------------*/
#endif /* APPCLIENT_MAIN_H_ */
