<?xml version="1.0" encoding="utf-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
         xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
         xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
         xmlns:wincap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/windowscapabilities"
         IgnorableNamespaces="mp uap wincap">

  <Identity Name="Microsoft.Windows.ContentDeliveryManager" Publisher="CN=Microsoft Windows, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" Version="10.0.10240.16384" ResourceId="neutral"/>

  <Properties>
    <DisplayName>ms-resource:AppDisplayName</DisplayName>
    <PublisherDisplayName>ms-resource:PublisherDisplayName</PublisherDisplayName>
    <Logo>Images\StoreLogo.png</Logo>
  </Properties>

  <Resources>
    <Resource Language="en-US" />
  </Resources>
    
  <Applications>
    <Application Id="App">
      <uap:VisualElements 
        DisplayName="ms-resource:AppDisplayName" 
        Description="ms-resource:AppDescription" 
        Square150x150Logo="Images\Logo.png" 
        Square44x44Logo="Images\SmallLogo.png" 
        BackgroundColor="#464646"
        AppListEntry="none">
        <uap:LockScreen Notification="badge" BadgeLogo="Images\BadgeLogo.png" />
        <uap:SplashScreen Image="Images\SplashScreen.png" />
      </uap:VisualElements>
      <Extensions>
        <Extension Category="windows.backgroundTasks" EntryPoint="ContentDeliveryManager.Background.RegistrationTask">
          <BackgroundTasks>
            <Task Type="systemEvent" />           <!-- OEMPreInstall trigger (called by the logon framework) -->
          </BackgroundTasks>
        </Extension>
        <Extension Category="windows.backgroundTasks" EntryPoint="ContentDeliveryManager.Background.ServicingTask">
          <BackgroundTasks>
            <Task Type="systemEvent" />           <!-- ServicingComplete trigger -->
          </BackgroundTasks>
        </Extension>
        <Extension Category="windows.backgroundTasks" EntryPoint="ContentDeliveryManager.Background.RefreshCacheTask">
          <BackgroundTasks>
            <Task Type="timer" />                 <!-- Alarm trigger (scheduling) -->
          </BackgroundTasks>
        </Extension>
        <Extension Category="windows.backgroundTasks" EntryPoint="ContentDeliveryManager.Background.HandleNewCreativesTask">
          <BackgroundTasks>
            <Task Type="systemEvent" />           <!-- Background transfer completion group trigger (downloads completed) -->
          </BackgroundTasks>
        </Extension>
        <Extension Category="windows.backgroundTasks" EntryPoint="ContentDeliveryManager.Background.UpdatePlacementTask">
          <BackgroundTasks>
            <Task Type="timer" />                 <!-- Alarm trigger (scheduling) -->
          </BackgroundTasks>
        </Extension>
        <Extension Category="windows.backgroundTasks" EntryPoint="ContentDeliveryManager.Background.MaintenanceTask">
          <BackgroundTasks>
            <Task Type="systemEvent" />           <!-- Maintenance trigger (periodic health check) -->
          </BackgroundTasks>
        </Extension>
        <Extension Category="windows.backgroundTasks" EntryPoint="ContentDeliveryManager.Background.CustomEventListenerTask">
          <BackgroundTasks>
            <Task Type="systemEvent" />           <!-- Custom system trigger (WNF notifications) -->
          </BackgroundTasks>
        </Extension>
        <Extension Category="windows.backgroundTasks" EntryPoint="ContentDeliveryManager.Background.NotificationChannelTask">
          <BackgroundTasks>
            <Task Type="systemEvent" />           <!-- SessionConnected trigger (MSA change) -->
          </BackgroundTasks>
        </Extension>
        <Extension Category="windows.backgroundTasks" EntryPoint="ContentDeliveryManager.Background.LiveTileNotificationTask">
          <BackgroundTasks>
            <Task Type="timer" />                 <!-- Alarm trigger (scheduling) -->
          </BackgroundTasks>
        </Extension>
        <Extension Category="windows.backgroundTasks" EntryPoint="ContentDeliveryManager.Background.ProcessCreativeEventsTask">
          <BackgroundTasks>
            <Task Type="timer" />                 <!-- Alarm trigger (scheduling) -->
          </BackgroundTasks>
        </Extension>
        <Extension Category="windows.backgroundTasks" EntryPoint="ContentDeliveryManager.Background.WatchdogTask">
          <BackgroundTasks>
            <Task Type="timer" />
            <!-- Alarm trigger (scheduling) -->
          </BackgroundTasks>
        </Extension>
        <Extension Category="windows.preInstalledConfigTask" EntryPoint="ContentDeliveryManager.Background.ConfigurationTask" />
        <uap:Extension Category="windows.appService" EntryPoint="ContentDeliveryManager.Background.AppServiceTask">
          <uap:AppService Name="microsoft-contentdeliverymanager" />
        </uap:Extension>
      </Extensions>
    </Application>
  </Applications>

  <Dependencies>
    <TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" />
  </Dependencies>

  <Extensions>
    <Extension Category="windows.activatableClass.inProcessServer">
      <InProcessServer>
        <Path>ContentDeliveryManager.Background.dll</Path>
        <ActivatableClass ActivatableClassId="ContentDeliveryManager.Background.RegistrationTask" ThreadingModel="both" />
        <ActivatableClass ActivatableClassId="ContentDeliveryManager.Background.ConfigurationTask" ThreadingModel="both" />
        <ActivatableClass ActivatableClassId="ContentDeliveryManager.Background.RefreshCacheTask" ThreadingModel="both" />
        <ActivatableClass ActivatableClassId="ContentDeliveryManager.Background.HandleNewCreativesTask" ThreadingModel="both" />
        <ActivatableClass ActivatableClassId="ContentDeliveryManager.Background.UpdatePlacementTask" ThreadingModel="both" />
        <ActivatableClass ActivatableClassId="ContentDeliveryManager.Background.MaintenanceTask" ThreadingModel="both" />
        <ActivatableClass ActivatableClassId="ContentDeliveryManager.Background.ServicingTask" ThreadingModel="both" />
        <ActivatableClass ActivatableClassId="ContentDeliveryManager.Background.AppServiceTask" ThreadingModel="both" />
        <ActivatableClass ActivatableClassId="ContentDeliveryManager.Background.CustomEventListenerTask" ThreadingModel="both" />
        <ActivatableClass ActivatableClassId="ContentDeliveryManager.Background.NotificationChannelTask" ThreadingModel="both" />
        <ActivatableClass ActivatableClassId="ContentDeliveryManager.Background.LiveTileNotificationTask" ThreadingModel="both" />
        <ActivatableClass ActivatableClassId="ContentDeliveryManager.Background.ProcessCreativeEventsTask" ThreadingModel="both" />
        <ActivatableClass ActivatableClassId="ContentDeliveryManager.Background.WatchdogTask" ThreadingModel="both" />
      </InProcessServer>
    </Extension>
    <Extension Category="windows.activatableClass.inProcessServer">
      <InProcessServer>
        <Path>ContentManagementSDK.dll</Path>
        <ActivatableClass ActivatableClassId="ContentManagementSDK.Placement" ThreadingModel="both" />
        <ActivatableClass ActivatableClassId="ContentManagementSDK.AssetInfo" ThreadingModel="both" />
        <ActivatableClass ActivatableClassId="ContentManagementSDK.PlacementConfig" ThreadingModel="both" />
        <ActivatableClass ActivatableClassId="ContentManagementSDK.PlacementCacheConfig" ThreadingModel="both" />
        <ActivatableClass ActivatableClassId="ContentManagementSDK.Settings" ThreadingModel="both" />
      </InProcessServer>
    </Extension>
  </Extensions>

  <Capabilities>
    <Capability Name="internetClient" />
    <wincap:Capability Name="contentDeliveryManagerSettings" />
    <wincap:Capability Name="lockScreenCreatives" />
    <wincap:Capability Name="visualElementsSystem" />
    <wincap:Capability Name="storeAppInstall" />
  </Capabilities>

</Package>