Exemplo n.º 1
0
 public static EntryID BuildFromPtr(IntPtr ptr, cemapi.IMAPISession owner)
 {
     int cbEntryID = Marshal.ReadInt32(ptr);
     if (!(cbEntryID > 0))
         return null;
     byte[] id = new byte[cbEntryID];
     IntPtr lpEntryID = Marshal.ReadIntPtr((IntPtr)((uint)ptr + Marshal.SizeOf(typeof(int))));
     for (int i = 0; i < cbEntryID; i++)
         id[i] = Marshal.ReadByte(lpEntryID, i);
     return new EntryID(id, owner);
 }
Exemplo n.º 2
0
 public MAPIMessage(cemapi.IMessage msg, IMAPIMessageID msgId)
     : base(msg, (msgId.ParentStore as MAPIMsgStore).Session)
 {
     this.msg = msg; this.msgId = msgId;
 }
Exemplo n.º 3
0
 public static MAPIMsgStoreID BuildFromID(IEntryID id, MAPI parent, cemapi.IMAPISession session)
 {
     if (id == null)
         return null;
     return new MAPIMsgStoreID(id, parent, session);
 }
Exemplo n.º 4
0
 public MAPIMsgStore(MAPI parent, cemapi.IMsgStore msgStore, cemapi.IMAPISession session)
     : base(msgStore, session)
 {
     this.msgStore = msgStore; this.parent = parent; this.session = session;
 }
Exemplo n.º 5
0
 private MAPIMsgStoreID(IEntryID id, MAPI parent, cemapi.IMAPISession session)
     : base(id, session)
 {
     this.parent = parent; this.session = session;
 }
Exemplo n.º 6
0
 public MAPIMsgStoreID(byte[] id, MAPI parent, cemapi.IMAPISession session)
     : base(id, session)
 {
     this.parent = parent; this.session = session;
 }
Exemplo n.º 7
0
 private IMAPIFolderID GetFolder(cemapi.PropTags tag)
 {
     cemapi.IPropValue[] props = this.msgStore.GetProps(new cemapi.PropTags[] { tag });
     if (props.Length != 1)
         throw new Exception("Couldn't get folder prop!");
     return new MAPIFolderID(props[0].AsBinary, this);
 }
Exemplo n.º 8
0
 private void adviser_ObjectNotification(EEventMask mask, cemapi.OBJECT_NOTIFICATION o)
 {
     switch (o.objType)
     {
         case cemapi.ObjectType.MAPI_FOLDER:
             if (this.FolderEvent != null)
             {
                 this.FolderEvent(MAPIFolderID.BuildFromID(o.entryID, this),
                     MAPIFolderID.BuildFromID(o.oldID, this),
                     mask);
             }
             break;
         case cemapi.ObjectType.MAPI_MESSAGE:
             if (this.MessageEvent != null)
             {
                 this.MessageEvent(MAPIMessageID.BuildFromID(o.entryID, MAPIFolderID.BuildFromID(o.parentID, this), this),
                     MAPIMessageID.BuildFromID(o.oldID, MAPIFolderID.BuildFromID(o.oldParentID, this), this),
                     mask);
             }
             break;
         default:
             throw new Exception("Event type \"" + o.objType.ToString() + "\" not implemented yet");
             //break;
     }
 }
Exemplo n.º 9
0
 private void adviser_NewMail(EEventMask mask, cemapi.NEWMAIL_NOTIFICATION o)
 {
     if (this.NewMessage == null)
         return;
     this.NewMessage(MAPIMessageID.BuildFromID(o.entryID, MAPIFolderID.BuildFromID(o.parentID, this), this), o.flags);
 }
Exemplo n.º 10
0
 public MAPIFolder(MAPIMsgStore parentStore, cemapi.IMAPIFolder folder, IMAPIFolderID folderId)
     : base(folder, parentStore.Session)
 {
     this.folder = folder; this.parentStore = parentStore; this.folderId = folderId;
 }
Exemplo n.º 11
0
 public MAPIProp(cemapi.IMAPIProp instance, cemapi.IMAPISession parent)
 {
     this.instance = instance; this.parent = parent;
 }
Exemplo n.º 12
0
 protected EntryID(IEntryID id, cemapi.IMAPISession owner)
 {
     this.id = id.AsByteArray; this.owner = owner;
 }
Exemplo n.º 13
0
 //public EntryID(IEntryID id, cemapi.IMAPISession owner) { this.owner = owner; this.id = id.AsByteArray; }
 public EntryID(byte[] id, cemapi.IMAPISession owner)
 {
     this.id = id; this.owner = owner;
 }