suite/shell/src/nsWindowsShellService.h
author Frank-Rainer Grahl <frgrahl@gmx.net>
Tue, 06 Dec 2016 18:59:03 +0100
changeset 46364 c2e84907d49c68601bb6669b8bdb4666de705eac
parent 28739 94adb5945ec3147c246b55b123676c324274fd25
permissions -rw-r--r--
Bug 1318735 - Fold suite binary component into xul. r=Ratty,IanN a=IanN

/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#include "nscore.h"
#include "nsShellService.h"
#include "nsString.h"
#include "nsIWindowsShellService.h"
#include "mozilla/Attributes.h"
#include "nsSuiteCID.h"

#include <windows.h>

typedef struct {
  const char* keyName;
  const char* valueName;
  const char* valueData;

  int32_t flags;
} SETTING;

class nsWindowsShellService final : public nsIWindowsShellService
{
public:
  nsWindowsShellService() : mCheckedThisSessionClient(false) {};
  nsresult Init();

  NS_DECL_ISUPPORTS
  NS_DECL_NSISHELLSERVICE
  NS_DECL_NSIWINDOWSSHELLSERVICE

protected:
  ~nsWindowsShellService() {}
  bool IsDefaultClientVista(uint16_t aApps, bool* aIsDefaultClient);
  bool TestForDefault(SETTING aSettings[], int32_t aSize);

private:
  bool mCheckedThisSessionClient;
  nsString mAppLongPath;
  nsString mAppShortPath;
};