#if (UNITY_WP8)

using System;
using CommonUI_Unity3D.Platform;
using UnityEngine;
using CommonUI.Gemo;
using CommonLang.Concurrent;
using MPQ.Updater;
using System.IO;
using CommonLang;

namespace CommonUI_Unity3D_WP8
{
    public class UnityPlatformWinPhone8 : IUnityPlatform
    {
        public bool IsNativeUnzip { get { return false; } }

        public void Assert(string msg)
        {
        }
        public long GetAvaliableSpace(string path)
        {
            return long.MaxValue;
        }
        public long GetTotalSpace(string path)
        {
            return long.MaxValue;
        }


        public Texture2D SysFontTexture(string text, bool readable, CommonUI.Display.FontStyle style, int fontSize, uint fontColor, int borderTime, uint borderColor, Size2D expectSize, out int boundW, out int boundH)
        {
            throw new NotImplementedException();
        }
        public bool TestTextLineBreak(string text, float size, CommonUI.Display.FontStyle style, int borderTime, float testWidth, out float realWidth, out float realHeight)
        {
            throw new NotImplementedException();
        }
        public void CopyPixels(Texture2D src, int sx, int sy, int sw, int sh, Texture2D dst, int dx, int dy)
        {
            throw new NotImplementedException();
        }

        public bool NativeDecompressFile(MPQUpdater updater, MPQUpdater.RemoteFileInfo zip_file, MPQUpdater.RemoteFileInfo mpq_file, AtomicLong current_unzip_bytes)
        {
            return CommonMPQ.SharpZipLib.Unzip.SharpZipLib_RunUnzipMPQ(updater, zip_file, mpq_file, current_unzip_bytes);
        }
        public bool NativeDecompressMemory(ArraySegment<byte> src, ArraySegment<byte> dst)
        {
            return CommonMPQ.SharpZipLib.Unzip.SharpZipLib_DecompressZ(src, dst);
        }
        public bool NativeGetFileMD5(string fullname, out string md5)
        {
            using (var fs = new FileStream(fullname, FileMode.Open, FileAccess.Read))
            {
                md5 = CMD5.CalculateMD5(fs);
            }
            return true;
        }
    }
    
}

#endif