/***********************************************************************\ * Virtuoso.Miranda.Plugins (Hyphen) * * Provides a managed wrapper for API of IM client Miranda. * * Copyright (C) 2006-2009 virtuoso * * deml.tomas@seznam.cz * * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * \***********************************************************************/ using System; using System.Collections.Generic; using System.Text; namespace Virtuoso.Miranda.Plugins.Infrastructure { public enum DatabaseSettingType : byte { Deleted = 0, //this setting just got deleted, no other values are valid Byte = 1, //bVal and cVal are valid UInt16 = 2, //wVal and sVal are valid UInt32 = 4, //dVal and lVal are valid AsciiString = 255, //pszVal is valid Blob = 254, //cpbVal and pbVal are valid UTF8String = 253, //pszVal is valid UnicodeString = 252, //pszVal is valid } public enum ProtocolType : int { Ignore = 50, // added during v0.3.3 Protocol = 1000, Encryption = 2000, Filter = 3000, Translation = 4000, Other = 10000 //avoid using this if at all possible } internal enum ProtocolFlagsKind : int { /// /// The network capabilities that the protocol supports. /// Capabilities = 1, /// /// The status modes that the protocol supports. /// StatusModes = 2, /// /// The status modes that the protocol supports away-style messages for. Uses the flags. /// AwayStatusModes = 3 } [Flags, CLSCompliant(false)] public enum ProtocolCapabilities : uint { /// /// None. /// None = 0, /// /// Supports IM sending. /// IMSend = 0x00000001, /// /// Supports IM receiving. /// IMReceive = 0x00000002, IM = (IMSend | IMReceive), /// /// Aupports separate URL sending. /// UrlSend = 0x00000004, /// /// Supports separate URL receiving. /// UrlReceive = 0x00000008, Url = (UrlSend | UrlReceive), /// /// Supports file sending. /// FileSend = 0x00000010, /// /// Supports file receiving. /// FileReceive = 0x00000020, File = (FileSend | FileReceive), /// /// Supports broadcasting away messages. /// ModeMessageSend = 0x00000040, /// /// Supports reading others' away messages. /// ModeMessageReceive = 0x00000080, ModeMessage = (ModeMessageSend | ModeMessageReceive), /// /// Contact lists are stored on the server, not locally. See notes below. /// ServerContactList = 0x00000100, /// /// Will get authorisation requests for some or all contacts. /// AuthorizationRequired = 0x00000200, /// /// Will get 'you were added' notifications. /// Added = 0x00000400, /// /// Has an invisible list. /// VisibleList = 0x00000800, /// /// Has a visible list for when in invisible mode. /// InvisibleList = 0x00001000, /// /// Supports setting different status modes to each contact. /// IndividualStatus = 0x00002000, /// /// the protocol is extensible and Supports plugin-defined messages. /// Extensible = 0x00004000, /// /// Supports direct (not server mediated) communication between clients. /// P2P = 0x00008000, /// /// Supports creation of new user IDs. /// NewUser = 0x00010000, /// /// Has a realtime chat capability. /// Chat = 0x00020000, /// /// Supports replying to a mode message request with different text depending on the contact requesting. /// IndividualModeMessage = 0x00040000, /// /// Supports a basic user searching facility. /// BasicSearch = 0x00080000, /// /// Supports one or more protocol-specific extended search schemes. /// ExtendedSearch = 0x00100000, /// /// Supports renaming of incoming files as they are transferred. /// CanRenameFile = 0x00200000, /// /// Can resume broken file transfers. /// FileResume = 0x00400000, /// /// Can add search results to the contact list. /// AddSearches = 0x00800000, /// /// Can send contacts to other users. /// ContactSend = 0x01000000, /// /// Can receive contacts from other users. /// ContactReceive = 0x02000000, Contact = (ContactSend | ContactReceive), /// /// Can change our user information stored on server. /// ChangeInfo = 0x04000000, /// /// Supports a search by e-mail feature. /// SearchByEmail = 0x08000000, /// /// Set if the uniquely identifying field of the network is the e-mail address. /// UserIDIsEmail = 0x10000000, /// /// Supports searching by nick/first/last names. /// SearchByName = 0x20000000, /// /// Has a dialog box to allow searching all the possible fields. /// ExtendedSearchUI = 0x40000000, /// /// The unique user IDs for this protocol are numeric. /// NumericUserID = 0x80000000, } [Flags] public enum ProtocolStatusModes : int { Online = 0x00000001, //an unadorned online mode Invisible = 0x00000002, ShortAway = 0x00000004, //Away on ICQ, BRB on MSN LongAway = 0x00000008, //NA on ICQ, Away on MSN LightDND = 0x00000010, //Occupied on ICQ, Busy on MSN HeavyDND = 0x00000020, //DND on ICQ FreeForChat = 0x00000040, OutToLunch = 0x00000080, OnThePhone = 0x00000100, Idle = 0x00000200 //added during 0.3.4 (2004/09/13) } public enum DatabaseEventType : short { Message = 0, Url = 1, Contacts = 2, //v0.1.2.2+ Added = 1000, //v0.1.1.0+: these used to be module- AuthorizationRequest = 1001, //specific codes, hence the module- File = 1002, //specific limit has been raised to 2000 } [Flags] public enum DatabaseEventProperties : int { None = 0, First = 1, //this is the first event in the chain; //internal only: *do not* use this flag Sent = 2, //this event was sent by the user. If not set this //event was received. Read = 4, //event has been read by the user. It does not need //to be processed any more except for history. Rtl = 8, //event contains the right-to-left aligned text Utf8 = 16 //event contains a text in utf-8 } [Flags] public enum MenuItemProperties : int { KeepCurrent = -1, None = 0, Grayed = 1, Checked = 2, Hidden = 4, OnlineOnly = 8, OfflineOnly = 16, NotOnListOnly = 32, NonNotOnListOnly = 64 } [Flags] public enum HotKeys : int { Alt = 0x0001, Ctrl = 0x0002, Shift = 0x0004, WinKey = 0x0008 } public enum ContactInfoPropertyType : int { Unknown = 0, Byte = 1, UInt16 = 2, UInt32 = 3, String = 4 } public static class CallbackResult { public const int Success = 0; public const int Failure = -1; } public static class EventResult { public const bool HonourEventChain = false; public const bool BreakEventChain = true; } [Flags] public enum ContactListEventProperties : int { None = 0, /// /// Flashes the icon even if the user is occupied, and puts the event at the top of the queue. /// Urgent = 1, /// /// The icon will not flash for ever, only a few times. This is for eg online alert. /// Minor = 2, // #define CLEF_URGENT 1 //flashes the icon even if the user is occupied, // //and puts the event at the top of the queue //#define CLEF_ONLYAFEW 2 //the icon will not flash for ever, only a few // //times. This is for eg online alert //#define CLEF_UNICODE 4 //set pszTooltip as unicode //#define CLEF_PROTOCOLGLOBAL 8 //set event globally for protocol, hContact has to be NULL, // //lpszProtocol the protocol ID name to be set //#if defined( _UNICODE ) // #define CLEF_TCHAR CLEF_UNICODE //will use TCHAR* instead of char* //#else // #define CLEF_TCHAR 0 //will return char*, as usual //#endif } }