Skip to content

Commit

Permalink
AppleMail 1.2 source code
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexandre Colucci committed Jan 8, 2019
0 parents commit 5300dcd
Show file tree
Hide file tree
Showing 122 changed files with 9,801 additions and 0 deletions.
9 changes: 9 additions & 0 deletions LICENSE
@@ -0,0 +1,9 @@
The MIT License

Copyright 2018 Corsair Memory, Inc

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 changes: 24 additions & 0 deletions README.md
@@ -0,0 +1,24 @@

`AppleMail` is a sample plugin demonstrating the [Stream Deck SDK](https://developer.elgato.com/documentation/stream-deck/).


# Description

`AppleMail` is a plugin that displays the number of unread emails in Apple Mail. Pressing on the key will launch Apple Mail.

Features:

- code written in Objective-C
- macOS only
- localized
- detects if Apple Mail is running


# Installation

In the Release folder, you can find the file `com.elgato.applemail.streamDeckPlugin`. If you double-click this file on your machine, Stream Deck will install the plugin.


# Source code

The Sources folder contains the source code of the plugin.
Binary file added Release/com.elgato.applemail.streamDeckPlugin
Binary file not shown.
516 changes: 516 additions & 0 deletions Sources/AppleMail.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

41 changes: 41 additions & 0 deletions Sources/Common/ESDConnectionManager.h
@@ -0,0 +1,41 @@
//==============================================================================
/**
@file ESDConnectionManager.h
@brief Wrapper to implement the communication with the Stream Deck application
@copyright (c) 2018, Corsair Memory, Inc.
This source code is licensed under the MIT-style license found in the LICENSE file.
**/
//==============================================================================

#import <Foundation/Foundation.h>

#import "ESDEventsProtocol.h"
#import "ESDSDKDefines.h"


NS_ASSUME_NONNULL_BEGIN


@interface ESDConnectionManager : NSObject

- (instancetype)initWithPort:(int)inPort
andPluginUUID:(NSString *)inPluginUUID
andRegisterEvent:(NSString *)inRegisterEvent
andInfo:(NSString *)inInfo
andDelegate:(id<ESDEventsProtocol>)inDelegate;


-(void)setTitle:(nullable NSString *)inTitle withContext:(id)inContext withTarget:(ESDSDKTarget)inTarget;
-(void)setImage:(nullable NSString*)inBase64ImageString withContext:(id)inContext withTarget:(ESDSDKTarget)inTarget;
-(void)showAlertForContext:(id)inContext;
-(void)showOKForContext:(id)inContext;
-(void)setSettings:(NSDictionary *)inSettings forContext:(id)inContext;
-(void)setState:(NSNumber *)inState forContext:(id)inContext;

@end

NS_ASSUME_NONNULL_END

0 comments on commit 5300dcd

Please sign in to comment.