/*
* Copyright 2015-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Linq;
using System.Text;
using System.Xml;
using System.Xml.Linq;
using Amazon.Util;
using Amazon.Util.Internal;
using Amazon.MobileAnalytics.MobileAnalyticsManager;
using Amazon.Runtime.Internal;
namespace Amazon.MobileAnalytics.MobileAnalyticsManager
{
///
/// Represents configuration for Mobile Analytics Manager.
///
public partial class MobileAnalyticsManagerConfig
{
private const int defaultSessionTimeout = 5;
private const int defaultMaxDBSize = 5242880;
private const double defaultDBWarningThreshold = 0.9;
private const int defaultMaxRequestSize = 102400;
private const bool defaultAllowUseDataNetwork = false;
///
/// Constructor of
///
public MobileAnalyticsManagerConfig()
{
SessionTimeout = defaultSessionTimeout;
MaxDBSize = defaultMaxDBSize;
DBWarningThreshold = defaultDBWarningThreshold;
MaxRequestSize = defaultMaxRequestSize;
AllowUseDataNetwork = defaultAllowUseDataNetwork;
#if BCL
ClientContextConfiguration = new ClientContextConfig();
#endif
}
#if BCL
///
/// Client Context Configuration .
///
public ClientContextConfig ClientContextConfiguration { get; set; }
#endif
///
/// If the app stays in background for a time greater than the SessionTimeout then Mobile Analytics client stops old session and
/// creates a new session once app comes back to foreground.
/// We recommend using values ranging from 5 to 10,
///
/// Default 5 seconds
public int SessionTimeout { get; set; }
///
/// Gets the max size of the database used for local storage of events. Event Storage will ignore new
/// events if the size of database exceed this size. Value is in Bytes.
/// We recommend using values ranging from 1MB to 10MB
///
/// Default 5MB
public int MaxDBSize { get; set; }
///
/// The Warning threshold. The values range between 0 - 1. If the values exceed beyond the threshold then the
/// Warning logs will be generated.
///
/// Default 0.9
public double DBWarningThreshold { get; set; }
///
/// The maximum size of the requests that can be submitted in every service call. Value can range between
/// 1-512KB (expressed in long). Value is in Bytes. Attention: Do not use value larger than 512KB. May cause
/// service to reject your Http request.
///
/// Default 100KB
public int MaxRequestSize { get; set; }
///
/// A value indicating whether service call is allowed over data network
/// Setting this property to true may increase customer's data usage.
///
/// Default false
public bool AllowUseDataNetwork { get; set; }
}
}