Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: desktop extension to unblock files and modify system file #523

Open
wants to merge 205 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
205 commits
Select commit Hold shift + click to select a range
67d0771
Enabled settings syncing accross all windowss
soumyamahunt Apr 20, 2020
74262ee
Updated branch.
soumyamahunt Apr 20, 2020
73bc699
Codefactor changes.
soumyamahunt Apr 20, 2020
c50834a
Made security improvement.
soumyamahunt Apr 20, 2020
a9f16e8
Small refactoring.
soumyamahunt Apr 20, 2020
ccd7500
Made some enhancements.
soumyamahunt Apr 20, 2020
ef92863
Updated branch.
soumyamahunt Apr 21, 2020
ed9402f
Merge branch 'master' into multi-window
soumyamahunt Apr 21, 2020
f51a3d7
Merge branch 'master' into multi-window
soumyamahunt Apr 22, 2020
a527e8c
Added syncing of recent list accross all windows.
soumyamahunt Apr 22, 2020
d19f6e7
Improved syncing perfermance.
soumyamahunt May 2, 2020
95e607f
Improved perfermance.
soumyamahunt May 2, 2020
1ef07ac
Implemented desktop extension to save file anywhere.
soumyamahunt May 7, 2020
6474d6c
fix
soumyamahunt May 8, 2020
bd5392e
fix.
soumyamahunt May 8, 2020
e6a3c28
Updated branch and made methods more robust.
soumyamahunt May 10, 2020
f2fcf77
Exit extensions when app closed.
soumyamahunt May 10, 2020
4a022c9
Fully implemented saving system file as admin.
soumyamahunt May 11, 2020
b023c58
Made code more readable.
soumyamahunt May 11, 2020
c3f665a
Updated branch.
soumyamahunt May 11, 2020
c7acdc5
Merge branch 'master' into multi-window
soumyamahunt May 11, 2020
af43797
Updated branch.
soumyamahunt May 11, 2020
2ddfbcf
fix.
soumyamahunt May 11, 2020
02b6c37
Updated branch.
soumyamahunt May 11, 2020
368eda7
Updated branch.
soumyamahunt May 11, 2020
e8158f4
fix
soumyamahunt May 11, 2020
9ec73cb
Merge remote-tracking branch 'JasonStein/master' into desktop-extension
soumyamahunt May 11, 2020
6339e8a
fix.
soumyamahunt May 11, 2020
860d866
fix.
soumyamahunt May 11, 2020
122655c
fix.
soumyamahunt May 12, 2020
894fcb2
fix.
soumyamahunt May 12, 2020
6abfdb9
refinement.
soumyamahunt May 15, 2020
7afd461
fix.
soumyamahunt Jun 3, 2020
50ef6e9
Implemented settings and recently opened file list syncing across all…
soumyamahunt Jun 26, 2020
281edc7
fixed.
soumyamahunt Jun 26, 2020
4692e7e
Updated branch.
soumyamahunt Jun 27, 2020
2bb7a86
fixed.
soumyamahunt Jun 27, 2020
b46d77e
fixed.
soumyamahunt Jun 27, 2020
3ceb369
fixed.
soumyamahunt Jun 27, 2020
6a9131a
fixed.
soumyamahunt Jun 27, 2020
1cb6890
fixed.
soumyamahunt Jun 27, 2020
780a2a6
fixed.
soumyamahunt Jun 27, 2020
ed22a33
fixed.
soumyamahunt Jul 3, 2020
1896672
fixed.
soumyamahunt Jul 15, 2020
9fd4c66
fixed.
soumyamahunt Jul 15, 2020
e5168bd
fixed.
soumyamahunt Jul 15, 2020
f581db5
fixed.
soumyamahunt Jul 15, 2020
e8641ed
fixed.
soumyamahunt Jul 15, 2020
008b3ee
fixed.
soumyamahunt Jul 15, 2020
733721c
fixed.
soumyamahunt Jul 15, 2020
86eee77
fixed.
soumyamahunt Jul 15, 2020
7294f62
fixed.
soumyamahunt Jul 15, 2020
7ca455e
fixed.
soumyamahunt Jul 15, 2020
670cb2c
fixed.
soumyamahunt Jul 15, 2020
abb566c
fixed.
soumyamahunt Jul 25, 2020
1db7aa3
Implemented sharing data via memory-mapped-file for faster ipc.
soumyamahunt Aug 5, 2020
879885a
update references.
soumyamahunt Aug 5, 2020
2ad49c9
fixed saving error.
soumyamahunt Aug 5, 2020
c6d16d8
code refinement.
soumyamahunt Aug 6, 2020
1c3519f
Replaced wcf with pipes.
soumyamahunt Aug 6, 2020
914acc3
Moved to dotnet core.
soumyamahunt Aug 6, 2020
731e6ae
resolved conflicts.
soumyamahunt Aug 6, 2020
4d0a942
removed redundant files.
soumyamahunt Aug 6, 2020
611f20b
fixed.
soumyamahunt Aug 7, 2020
9c19b5f
fix for pipeline.
soumyamahunt Aug 7, 2020
62d5662
pipeline fix.
soumyamahunt Aug 7, 2020
0eab962
pipeline fix.
soumyamahunt Aug 7, 2020
16eb4ff
fix pipeline.
soumyamahunt Aug 7, 2020
3118ce9
pipeline fix.
soumyamahunt Aug 7, 2020
d327d5d
pipeline fix.
soumyamahunt Aug 7, 2020
0643063
fixed pipeline.
soumyamahunt Aug 7, 2020
6d850c8
fixed pipeline.
soumyamahunt Aug 7, 2020
07adf95
pipeline fix.
soumyamahunt Aug 7, 2020
37c7382
pipeline fix.
soumyamahunt Aug 7, 2020
d33fa95
code-refactor and added documentation.
soumyamahunt Aug 7, 2020
215a272
pipeline fix.
soumyamahunt Aug 7, 2020
ef331ac
Moved to dotnet 5.
soumyamahunt Aug 7, 2020
69f2030
Merge branch 'master' into desktop-extension
soumyamahunt Aug 7, 2020
629efb5
Fixed extension crashing.
soumyamahunt Aug 8, 2020
3080f67
Added ARM builds for desktop extension.
soumyamahunt Aug 8, 2020
1cff733
updated targets.
soumyamahunt Aug 8, 2020
fb9e3f0
Implemented handling multiple sessions.
soumyamahunt Aug 8, 2020
9ae0cb8
Fixed compiling with "Any Cpu" option.
soumyamahunt Aug 8, 2020
b7b5215
code-refinement.
soumyamahunt Aug 8, 2020
2bee194
code-refinement.
soumyamahunt Aug 9, 2020
22882d6
fixed instance handling.
soumyamahunt Aug 9, 2020
b07af34
Implemented crash-analytics for desktop extension.
soumyamahunt Aug 17, 2020
f92e508
Added better error handling.
soumyamahunt Aug 25, 2020
58091bd
Code refactor.
soumyamahunt Sep 18, 2020
1352a80
Code refactor.
soumyamahunt Sep 23, 2020
cd7c133
Code refactor.
soumyamahunt Sep 23, 2020
59097e6
Merge branch 'master' into desktop-extension
soumyamahunt Nov 11, 2020
1ed3342
Updated app limitations list.
soumyamahunt Nov 12, 2020
5e347c6
Merge branch 'desktop-extension' of https://github.com/soumyamahunt/N…
soumyamahunt Nov 12, 2020
e60544a
Updated target framework to use winrt apis.
soumyamahunt Nov 12, 2020
3d70549
Moved to Win32 from .NET for desktop extension to reuce deployment size.
soumyamahunt Nov 30, 2020
0c80fd2
code refactor.
soumyamahunt Nov 30, 2020
05b04a6
code refactor.
soumyamahunt Dec 1, 2020
a474d5f
code refactor.
soumyamahunt Dec 1, 2020
78bacec
Implemented error logging.
soumyamahunt Dec 3, 2020
845bad6
Fixed github action.
soumyamahunt Dec 3, 2020
21dfdce
Fixed github action.
soumyamahunt Dec 3, 2020
7e293b8
Fixed Github task.
soumyamahunt Dec 3, 2020
a9d21de
code refactor.
soumyamahunt Dec 4, 2020
b4e7d64
Fixed reading from pipe in some cases.
soumyamahunt Dec 5, 2020
0ea00b1
code refactor.
soumyamahunt Dec 6, 2020
1442d26
Initial commit to integrate AppCenter crashanalytics.
soumyamahunt Dec 8, 2020
68a368d
Fix github workflow.
soumyamahunt Dec 8, 2020
7bfc5f2
code refactor.
soumyamahunt Dec 8, 2020
6e3e890
Fix workflow.
soumyamahunt Dec 9, 2020
236e635
Fixed workflow.
soumyamahunt Dec 9, 2020
0074b39
Fix workflow.
soumyamahunt Dec 9, 2020
b958c49
Fix workflow.
soumyamahunt Dec 9, 2020
03eaed9
Fix workflow.
soumyamahunt Dec 9, 2020
4620473
Fix workflow.
soumyamahunt Dec 9, 2020
f415f70
Fix workflow.
soumyamahunt Dec 10, 2020
1a65233
Workflow fix.
soumyamahunt Dec 10, 2020
fe4a0fd
Fix workflow.
soumyamahunt Dec 10, 2020
3e81308
Fix workflow.
soumyamahunt Dec 10, 2020
34b36ee
Fix workflow.
soumyamahunt Dec 10, 2020
e47cd29
Fix workflow.
soumyamahunt Dec 10, 2020
661751e
Fix workflow.
soumyamahunt Dec 10, 2020
5ecc8e8
Fix workflow.
soumyamahunt Dec 10, 2020
d00a40d
Fix workflow.
soumyamahunt Dec 10, 2020
ce21e0c
code refactor.
soumyamahunt Dec 10, 2020
1049053
Merge branch 'master' into desktop-extension
soumyamahunt Dec 10, 2020
728e758
code refactor.
soumyamahunt Dec 10, 2020
6ebbef1
code refactor.
soumyamahunt Dec 11, 2020
777cce7
Implemented custom event tracking.
soumyamahunt Dec 14, 2020
3bdbf70
code refactor.
soumyamahunt Dec 15, 2020
df40892
Implemented getting stacktrace in appcenter.
soumyamahunt Dec 16, 2020
ac72a76
Merge branch 'master' into desktop-extension
soumyamahunt Dec 16, 2020
c844c49
code-refactor.
soumyamahunt Dec 16, 2020
64df99b
code refactor.
soumyamahunt Dec 18, 2020
cfda6d9
code refactor.
soumyamahunt Dec 19, 2020
4b15f5c
Added crash analytics for background task.
soumyamahunt Dec 20, 2020
2cc55a3
code refactor.
soumyamahunt Dec 21, 2020
3104d28
code refactor.
soumyamahunt Dec 21, 2020
10cb5cd
code refactor.
soumyamahunt Dec 22, 2020
74367bb
code refactor.
soumyamahunt Dec 22, 2020
1edee0e
Added more crash analytics.
soumyamahunt Dec 23, 2020
e4ed603
Updated vcpkg.
soumyamahunt Dec 23, 2020
91f0461
Neglect BOM during pipe write in uwp app.
soumyamahunt Dec 23, 2020
d725321
Updated C++ language version.
soumyamahunt Dec 24, 2020
612c98b
code-refactor.
soumyamahunt Jan 2, 2021
14cc0fa
Implemented process syncronization to indicate client of connecting t…
soumyamahunt Jan 2, 2021
6a6af48
Better lifetime management for desktop extension.
soumyamahunt Jan 3, 2021
3df5a01
Clean up unnecessary references.
soumyamahunt Jan 3, 2021
4392113
Fix desktop extension lifetime.
soumyamahunt Jan 3, 2021
e1c950d
Added functionality to rename system files.
soumyamahunt Jan 5, 2021
f49f5c8
Resolved merge conflicts.
soumyamahunt Jan 5, 2021
b0d5e21
Code refactor.
soumyamahunt Jan 5, 2021
198e1af
code refacor.
soumyamahunt Jan 7, 2021
e78ad35
Merge branch 'master' into settings-sync
soumyamahunt Jan 9, 2021
09ae658
Merge branch 'master' into desktop-extension
soumyamahunt Jan 9, 2021
086f217
Removed AppServiceConnection as IPC.
soumyamahunt Jan 9, 2021
30d9b0a
Modified script execution policy.
soumyamahunt Jan 9, 2021
567d99b
Modified build tasks.
soumyamahunt Jan 9, 2021
5d7573b
Corrected some spelling mistakes.
soumyamahunt Jan 15, 2021
babac17
Better app analytics.
soumyamahunt Jan 16, 2021
f26c7dd
code refactor.
soumyamahunt Jan 16, 2021
b9deb31
Implemented unblocking file modified by UWP.
soumyamahunt Jan 18, 2021
14532e2
code refactor.
soumyamahunt Jan 18, 2021
5dd0f24
Fixed rename not working.
soumyamahunt Jan 20, 2021
8b82f49
Updated branch.
soumyamahunt Feb 9, 2021
e64448a
Fix build failing.
soumyamahunt Feb 9, 2021
20f570c
Implementer version constraint with vcpkg.
soumyamahunt Feb 11, 2021
e53ac4b
Update cppwinrt.
soumyamahunt Feb 12, 2021
846d460
Use msbuild tasks instead of powershell script to generate manifest.
soumyamahunt Feb 13, 2021
766b4fe
Fix github workflow.
soumyamahunt Feb 13, 2021
4e3a751
Fix typos.
soumyamahunt Feb 13, 2021
31b8984
Remove unnecessary tasks.
soumyamahunt Feb 13, 2021
6b859cb
Update branch.
soumyamahunt Feb 13, 2021
f0fa752
code refactor.
soumyamahunt Feb 15, 2021
81ceecb
Created shared project to share constants between uwp and desktop app.
soumyamahunt Feb 18, 2021
8de1086
Fixed CodeFactor issues.
soumyamahunt Feb 18, 2021
43583ee
Refactor GitHub task.
soumyamahunt Feb 26, 2021
8c8fa47
Provide default baseline for vcpkg manifest validation.
soumyamahunt Feb 28, 2021
9ce996d
Implement host triplet to fix cross compile.
soumyamahunt Mar 12, 2021
bd6261d
Implement vcpkg binary caching
soumyamahunt Mar 12, 2021
a20a8da
Removed empty spaces
soumyamahunt Mar 12, 2021
5bd5d3c
Fix workflow failing
soumyamahunt Mar 12, 2021
406b052
Fix github workflow
soumyamahunt Mar 12, 2021
eec7a51
Fix Github workflow.
soumyamahunt Mar 13, 2021
6874bd9
Fix Github workflow
soumyamahunt Mar 13, 2021
a811450
Refactor github workflow.
soumyamahunt Mar 13, 2021
72152a2
Refactor github workflow.
soumyamahunt Mar 13, 2021
4336e8b
Refactor github workflow.
soumyamahunt Mar 13, 2021
efd25ba
Refactor github task.
soumyamahunt Mar 13, 2021
d50403f
Refactor Github workflow.
soumyamahunt Mar 13, 2021
e6affaa
Update nuget packages.
soumyamahunt Mar 13, 2021
feaf0c3
Implemented vcpkg use Nuget cache.
soumyamahunt Mar 14, 2021
b9a2960
Fix Github package upload.
soumyamahunt Mar 14, 2021
00f0836
Fix failing to upload to Github packages.
soumyamahunt Mar 14, 2021
e0bd174
Change username to repository owner.
soumyamahunt Mar 14, 2021
376e899
Resolve conflicts.
soumyamahunt Mar 22, 2021
851a30e
chore: move more methods to winrt
soumyamahunt Apr 20, 2021
4a62549
chore: code refactor
soumyamahunt May 22, 2021
312df81
chore: code refactor.
soumyamahunt May 22, 2021
bca7799
remove fmt dependency
soumyamahunt Jun 27, 2021
0576049
remove curl dependency
soumyamahunt Jul 3, 2021
2439960
remove rapidjson dependency
soumyamahunt Jul 3, 2021
6cb9ddf
remove vcpkg dependency
soumyamahunt Jul 3, 2021
fe9b754
chore: refactor project targets
soumyamahunt Jul 23, 2021
7892c00
chore: resolve codefactor errors
soumyamahunt Jul 23, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 17 additions & 6 deletions .github/workflows/Build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
configuration: [Debug, Release, Production]
env:
Solution_Name: src\Notepads.sln
Project_Path: src\Notepads\Notepads.csproj
Project_Path: src\Notepads.Package\Notepads.Package.wapproj

runs-on: windows-latest
steps:
Expand All @@ -24,16 +24,27 @@ jobs:
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v1

# Add NuGet to the PATH: https://github.com/NuGet/setup-nuget
- name: Setup NuGet
uses: NuGet/setup-nuget@v1.0.5

- name: Restore the application
run: msbuild $env:Solution_Name /t:Restore /p:Configuration=$env:Configuration
env:
Configuration: ${{ matrix.configuration }}
shell: 'pwsh'
run: |
msbuild $env:Solution_Name /t:Restore
nuget restore $env:Solution_Name

- name: Build
shell: 'pwsh'
run: |
msbuild $env:Project_Path /p:Configuration=$env:Configuration /p:UapAppxPackageBuildMode=$env:Appx_Package_Build_Mode /p:AppxBundle=$env:Appx_Bundle /p:AppxPackageSigningEnabled=false /p:AppxBundlePlatforms="$env:Appx_Bundle_Platforms"
msbuild $env:Project_Path `
/p:Configuration=$env:Configuration `
/p:UapAppxPackageBuildMode=$env:Appx_Package_Build_Mode `
/p:AppxBundle=$env:Appx_Bundle `
/p:AppxPackageSigningEnabled=false `
/p:AppxBundlePlatforms="$env:Appx_Bundle_Platforms"
env:
Appx_Bundle: Always
Appx_Bundle_Platforms: x86|x64
Appx_Package_Build_Mode: StoreUpload
Configuration: ${{ matrix.configuration }}
Configuration: ${{ matrix.configuration }}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -353,4 +353,4 @@ healthchecksdb
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db
Thumbs.db
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ So here comes the “Notepads” 🎉 (s stands for Sets).

## Platform limitations (UWP):

* You won't be able to save files to system folders due to UWP restriction (windows, system32, etc.).
* You cannot associate potentially harmful file types (.cmd, .bat etc.) with Notepads.
* Notepads does not work well with large files; the file size limit is set to 1MB for now. I will add large file support later.

Expand Down
17 changes: 15 additions & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,23 @@ steps:
- task: VSBuild@1
inputs:
platform: 'x64'
solution: '$(solution)'
solution: '**/*.wapproj'
configuration: '$(buildConfiguration)'
msbuildArgs: '/p:AppxBundlePlatforms="$(buildPlatform)"
msbuildArgs: '/t:build;_GenerateAppxPackage
/p:AppxBundlePlatforms="$(buildPlatform)"
/p:AppxPackageDir="$(appxPackageDir)"
/p:AppxBundle=Always
/p:UapAppxPackageBuildMode=StoreUpload
/p:AppxPackageSigningEnabled=false'

- task: CopyFiles@2
displayName: 'Copy Files to: $(build.artifactstagingdirectory)'
inputs:
SourceFolder: '$(system.defaultworkingdirectory)'
Contents: '**\bin\$(BuildConfiguration)\**'
TargetFolder: '$(build.artifactstagingdirectory)'

- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: drop'
inputs:
PathtoPublish: '$(build.artifactstagingdirectory)'
30 changes: 1 addition & 29 deletions src/Notepads.Controls/Notepads.Controls.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProjectGuid>{7AA5E631-B663-420E-A08F-002CD81DF855}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
Expand All @@ -17,34 +17,6 @@
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Production|AnyCPU'">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Production\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<PlatformTarget>x86</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
Expand Down
76 changes: 76 additions & 0 deletions src/Notepads.Core/CoreKey.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
#include "pch.h"
#include "CoreKey.h"
#include "CoreKey.g.cpp"

namespace winrt::Notepads::Core::implementation
{
hstring CoreKey::PackageSidStr()
{
return PACKAGE_SID_STR;
}

hstring CoreKey::AppCenterInstallIdStr()
{
return APP_CENTER_INSTALL_ID_STR;
}

hstring CoreKey::LastChangedSettingsKeyStr()
{
return LAST_CHANGED_SETTINGS_KEY_STR;
}

hstring CoreKey::LastChangedSettingsAppInstanceIdStr()
{
return LAST_CHANGED_SETTINGS_APP_INSTANCE_ID_STR;
}

hstring CoreKey::LaunchElevatedProcessSuccessStr()
{
return LAUNCH_ELEVATED_PROCESS_SUCCESS_STR;
}

hstring CoreKey::LaunchElevatedProcessFailedStr()
{
return LAUNCH_ELEVATED_PROCESS_FAILED_STR;
}

hstring CoreKey::ExtensionProcessLifetimeObjNameStr()
{
return EXTENSION_PROCESS_LIFETIME_OBJ_NAME_STR;
}

hstring CoreKey::ElevatedProcessLifetimeObjNameStr()
{
return ELEVATED_PROCESS_LIFETIME_OBJ_NAME_STR;
}

hstring CoreKey::ExtensionUnblockEventNameStr()
{
return EXTENSION_UNBLOCK_EVENT_NAME_STR;
}

hstring CoreKey::ElevatedWriteEventNameStr()
{
return ELEVATED_WRITE_EVENT_NAME_STR;
}

hstring CoreKey::ElevatedRenameEventNameStr()
{
return ELEVATED_RENAME_EVENT_NAME_STR;
}

hstring CoreKey::ExtensionUnblockPipeConnectionNameStr()
{
return EXTENSION_UNBLOCK_PIPE_CONNECTION_NAME_STR;
}

hstring CoreKey::ElevatedWritePipeConnectionNameStr()
{
return ELEVATED_WRITE_PIPE_CONNECTION_NAME_STR;
}

hstring CoreKey::ElevatedRenamePipeConnectionNameStr()
{
return ELEVATED_RENAME_PIPE_CONNECTION_NAME_STR;
}
}
30 changes: 30 additions & 0 deletions src/Notepads.Core/CoreKey.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#pragma once
#include "CoreKey.g.h"

namespace winrt::Notepads::Core::implementation
{
struct CoreKey : CoreKeyT<CoreKey>
{
CoreKey() = default;

static hstring PackageSidStr();
static hstring AppCenterInstallIdStr();
static hstring LastChangedSettingsKeyStr();
static hstring LastChangedSettingsAppInstanceIdStr();
static hstring LaunchElevatedProcessSuccessStr();
static hstring LaunchElevatedProcessFailedStr();
static hstring ExtensionProcessLifetimeObjNameStr();
static hstring ElevatedProcessLifetimeObjNameStr();
static hstring ExtensionUnblockEventNameStr();
static hstring ElevatedWriteEventNameStr();
static hstring ElevatedRenameEventNameStr();
static hstring ExtensionUnblockPipeConnectionNameStr();
static hstring ElevatedWritePipeConnectionNameStr();
static hstring ElevatedRenamePipeConnectionNameStr();
};
}

namespace winrt::Notepads::Core::factory_implementation
{
struct CoreKey : CoreKeyT<CoreKey, implementation::CoreKey> { };
}
21 changes: 21 additions & 0 deletions src/Notepads.Core/CoreKey.idl
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
namespace Notepads.Core
{
[default_interface]
static runtimeclass CoreKey
{
static String PackageSidStr { get; };
static String AppCenterInstallIdStr { get; };
static String LastChangedSettingsKeyStr { get; };
static String LastChangedSettingsAppInstanceIdStr { get; };
static String LaunchElevatedProcessSuccessStr { get; };
static String LaunchElevatedProcessFailedStr { get; };
static String ExtensionProcessLifetimeObjNameStr { get; };
static String ElevatedProcessLifetimeObjNameStr { get; };
static String ExtensionUnblockEventNameStr { get; };
static String ElevatedWriteEventNameStr { get; };
static String ElevatedRenameEventNameStr { get; };
static String ExtensionUnblockPipeConnectionNameStr { get; };
static String ElevatedWritePipeConnectionNameStr { get; };
static String ElevatedRenamePipeConnectionNameStr { get; };
}
}
3 changes: 3 additions & 0 deletions src/Notepads.Core/Notepads.Core.def
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
EXPORTS
DllCanUnloadNow = WINRT_CanUnloadNow PRIVATE
DllGetActivationFactory = WINRT_GetActivationFactory PRIVATE
Loading