Files
lserp_cs_5.0/插件库/Cef3.24/Interop/Structs/cef_cookie_t.cs
T
2026-07-10 15:25:05 +08:00

53 lines
1.4 KiB
C#

//
// This file manually written from cef/include/internal/cef_types.h.
//
namespace Cef3.Interop
{
using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, Pack = libcef.ALIGN)]
internal unsafe struct cef_cookie_t
{
public cef_string_t name;
public cef_string_t value;
public cef_string_t domain;
public cef_string_t path;
public int secure;
public int httponly;
public cef_time_t creation;
public cef_time_t last_access;
public int has_expires;
public cef_time_t expires;
internal static void Clear(cef_cookie_t* ptr)
{
libcef.string_clear(&ptr->name);
libcef.string_clear(&ptr->value);
libcef.string_clear(&ptr->domain);
libcef.string_clear(&ptr->path);
}
#region Alloc & Free
private static int _sizeof;
static cef_cookie_t()
{
_sizeof = Marshal.SizeOf(typeof(cef_cookie_t));
}
public static cef_cookie_t* Alloc()
{
var ptr = (cef_cookie_t*)Marshal.AllocHGlobal(_sizeof);
*ptr = new cef_cookie_t();
return ptr;
}
public static void Free(cef_cookie_t* ptr)
{
Marshal.FreeHGlobal((IntPtr)ptr);
}
#endregion
}
}