Adjust HandshakeSignal enum to engine changes sync
authorThomas
Thu, 14 Nov 2019 16:18:44 +0100
branchsync
changeset 3735b10b2200c91
parent 372 1a8670bd5d0e
child 374 ccc4c88f280e
Adjust HandshakeSignal enum to engine changes
pEpCOMServerAdapter.idl
     1.1 --- a/pEpCOMServerAdapter.idl	Fri Nov 08 11:52:34 2019 +0100
     1.2 +++ b/pEpCOMServerAdapter.idl	Thu Nov 14 16:18:44 2019 +0100
     1.3 @@ -30,17 +30,17 @@
     1.4          // handshake accepted by user
     1.5          SyncNotifyAcceptedDeviceAdded = 6,
     1.6          SyncNotifyAcceptedGroupCreated = 7,
     1.7 -        // SyncNotifyAcceptedDeviceMoved = 8,
     1.8 +        SyncNotifyAcceptedDeviceAccepted = 8,
     1.9  
    1.10          // handshake dialog must be closed
    1.11 -        SyncNotifyOvertaken = 9,
    1.12 +        // SyncNotifyOvertaken = 9,
    1.13  
    1.14 -		// forming group
    1.15 -		SyncNotifyFormingGroup = 10,
    1.16 +        // forming group
    1.17 +        // SyncNotifyFormingGroup = 10,
    1.18  
    1.19 -		// notificaton of actual group status
    1.20 -		SyncNotifySole = 254,
    1.21 -		SyncNotifyInGroup = 255
    1.22 +        // notificaton of actual group status
    1.23 +        SyncNotifySole = 254,
    1.24 +        SyncNotifyInGroup = 255
    1.25      } SyncHandshakeSignal;
    1.26  
    1.27      [id(1)] HRESULT MessageToSend([in] struct TextMessage * msg);
    1.28 @@ -57,460 +57,460 @@
    1.29  ]
    1.30  interface IpEpEngine : IUnknown {
    1.31  
    1.32 -	// runtime config of the adapter
    1.33 +    // runtime config of the adapter
    1.34  
    1.35 -	[id(1)] HRESULT VerboseLogging([in] VARIANT_BOOL enable);
    1.36 +    [id(1)] HRESULT VerboseLogging([in] VARIANT_BOOL enable);
    1.37  
    1.38 -	// runtime config of the engine
    1.39 +    // runtime config of the engine
    1.40  
    1.41 -	[id(2)] HRESULT PassiveMode([in] VARIANT_BOOL enable);
    1.42 -	[id(3)] HRESULT UnencryptedSubject([in] VARIANT_BOOL enable);
    1.43 +    [id(2)] HRESULT PassiveMode([in] VARIANT_BOOL enable);
    1.44 +    [id(3)] HRESULT UnencryptedSubject([in] VARIANT_BOOL enable);
    1.45  
    1.46 -	// basic API
    1.47 +    // basic API
    1.48  
    1.49 -	[id(4)] HRESULT ExportKey([in] BSTR fpr, [out, retval] BSTR * keyData);
    1.50 -	[id(5)] HRESULT Log([in] BSTR title, [in] BSTR entity, [in, defaultvalue("")] BSTR description, [in, defaultvalue("")] BSTR comment);
    1.51 -	[id(6)] HRESULT Trustwords([in] BSTR fpr, [in, defaultvalue("en")] BSTR lang, [in, defaultvalue(0)] LONG maxWords, [out, retval] BSTR * words);
    1.52 -	[id(7)] HRESULT GetTrustwords([in] struct pEpIdentity * id1, [in] struct pEpIdentity * id2, [in, defaultvalue("en")] BSTR lang, [in, defaultvalue(0)] VARIANT_BOOL full, [out, retval] BSTR * words);
    1.53 -	[id(8)] HRESULT GetCrashdumpLog([in, defaultvalue(0)] LONG maxlines, [out, retval] BSTR * log);
    1.54 -	[id(9)] HRESULT GetEngineVersion([out, retval] BSTR * engineVersion);
    1.55 -	[id(10)] HRESULT GetLanguageList([out, retval] BSTR * languages);
    1.56 +    [id(4)] HRESULT ExportKey([in] BSTR fpr, [out, retval] BSTR * keyData);
    1.57 +    [id(5)] HRESULT Log([in] BSTR title, [in] BSTR entity, [in, defaultvalue("")] BSTR description, [in, defaultvalue("")] BSTR comment);
    1.58 +    [id(6)] HRESULT Trustwords([in] BSTR fpr, [in, defaultvalue("en")] BSTR lang, [in, defaultvalue(0)] LONG maxWords, [out, retval] BSTR * words);
    1.59 +    [id(7)] HRESULT GetTrustwords([in] struct pEpIdentity * id1, [in] struct pEpIdentity * id2, [in, defaultvalue("en")] BSTR lang, [in, defaultvalue(0)] VARIANT_BOOL full, [out, retval] BSTR * words);
    1.60 +    [id(8)] HRESULT GetCrashdumpLog([in, defaultvalue(0)] LONG maxlines, [out, retval] BSTR * log);
    1.61 +    [id(9)] HRESULT GetEngineVersion([out, retval] BSTR * engineVersion);
    1.62 +    [id(10)] HRESULT GetLanguageList([out, retval] BSTR * languages);
    1.63  
    1.64 -	typedef [v1_enum] enum pEpComType {
    1.65 -		pEpCtUnknown = 0,
    1.66 +    typedef [v1_enum] enum pEpComType {
    1.67 +        pEpCtUnknown = 0,
    1.68  
    1.69 -		// range 0x01 to 0x09: no encryption, 0x0a to 0x0e: nothing reasonable
    1.70 +        // range 0x01 to 0x09: no encryption, 0x0a to 0x0e: nothing reasonable
    1.71  
    1.72 -		pEpCtNoEncryption = 0x01,                // generic
    1.73 -		pEpCtNoEncryptedChannel = 0x02,
    1.74 -		pEpCtKeyNotFound = 0x03,
    1.75 -		pEpCtKeyExpired = 0x04,
    1.76 -		pEpCtKeyRevoked = 0x05,
    1.77 -		pEpCtKeyB0rken = 0x06,
    1.78 -		pEpCtMyKeyNotIncluded = 0x09,
    1.79 +        pEpCtNoEncryption = 0x01,                // generic
    1.80 +        pEpCtNoEncryptedChannel = 0x02,
    1.81 +        pEpCtKeyNotFound = 0x03,
    1.82 +        pEpCtKeyExpired = 0x04,
    1.83 +        pEpCtKeyRevoked = 0x05,
    1.84 +        pEpCtKeyB0rken = 0x06,
    1.85 +        pEpCtMyKeyNotIncluded = 0x09,
    1.86  
    1.87 -		pEpCtSecurityByObscurity = 0x0a,
    1.88 -		pEpCtB0rkenCrypto = 0x0b,
    1.89 -		pEpCtKeyTooShort = 0x0c,
    1.90 +        pEpCtSecurityByObscurity = 0x0a,
    1.91 +        pEpCtB0rkenCrypto = 0x0b,
    1.92 +        pEpCtKeyTooShort = 0x0c,
    1.93  
    1.94 -		pEpCtCompromised = 0x0e,                 // known compromized connection
    1.95 -		pEpCtMistrusted = 0x0f,                  // known mistrusted key
    1.96 +        pEpCtCompromised = 0x0e,                 // known compromized connection
    1.97 +        pEpCtMistrusted = 0x0f,                  // known mistrusted key
    1.98  
    1.99 -		// range 0x10 to 0x3f: unconfirmed encryption
   1.100 +        // range 0x10 to 0x3f: unconfirmed encryption
   1.101  
   1.102 -		pEpCtUnconfirmedEncryption = 0x10,       // generic
   1.103 -		pEpCtOpenPGPWeakUnconfirmed = 0x11,      // RSA 1024 is weak
   1.104 +        pEpCtUnconfirmedEncryption = 0x10,       // generic
   1.105 +        pEpCtOpenPGPWeakUnconfirmed = 0x11,      // RSA 1024 is weak
   1.106  
   1.107 -		pEpCtToBeChecked = 0x20,                 // generic
   1.108 -		pEpCtSMIMEUnconfirmed = 0x21,
   1.109 -		pEpCtCMSUnconfirmed = 0x22,
   1.110 +        pEpCtToBeChecked = 0x20,                 // generic
   1.111 +        pEpCtSMIMEUnconfirmed = 0x21,
   1.112 +        pEpCtCMSUnconfirmed = 0x22,
   1.113  
   1.114 -		pEpCtStrongButUnconfirmed = 0x30,        // generic
   1.115 -		pEpCtOpenPGPUnconfirmed = 0x38,          // key at least 2048 bit RSA or EC
   1.116 -		pEpCtOTRUnconfirmed = 0x3a,
   1.117 +        pEpCtStrongButUnconfirmed = 0x30,        // generic
   1.118 +        pEpCtOpenPGPUnconfirmed = 0x38,          // key at least 2048 bit RSA or EC
   1.119 +        pEpCtOTRUnconfirmed = 0x3a,
   1.120  
   1.121 -		// range 0x40 to 0x7f: unconfirmed encryption and anonymization
   1.122 +        // range 0x40 to 0x7f: unconfirmed encryption and anonymization
   1.123  
   1.124 -		pEpCtUnconfirmedEncAnon = 0x40,          // generic
   1.125 -		pEpCtpEpUnconfirmed = 0x7f,
   1.126 +        pEpCtUnconfirmedEncAnon = 0x40,          // generic
   1.127 +        pEpCtpEpUnconfirmed = 0x7f,
   1.128  
   1.129 -		pEpCtConfirmed = 0x80,                   // this bit decides if trust is confirmed
   1.130 +        pEpCtConfirmed = 0x80,                   // this bit decides if trust is confirmed
   1.131  
   1.132 -		// range 0x81 to 0x8f: reserved
   1.133 -		// range 0x90 to 0xbf: confirmed encryption
   1.134 +        // range 0x81 to 0x8f: reserved
   1.135 +        // range 0x90 to 0xbf: confirmed encryption
   1.136  
   1.137 -		pEpCtConfirmedEncryption = 0x90,         // generic
   1.138 -		pEpCtOpenPGPWeak = 0x91,                 // RSA 1024 is weak
   1.139 +        pEpCtConfirmedEncryption = 0x90,         // generic
   1.140 +        pEpCtOpenPGPWeak = 0x91,                 // RSA 1024 is weak
   1.141  
   1.142 -		pEpCtToBeCheckedConfirmed = 0xa0,        // generic
   1.143 -		pEpCtSMIME = 0xa1,
   1.144 -		pEpCtCMS = 0xa2,
   1.145 +        pEpCtToBeCheckedConfirmed = 0xa0,        // generic
   1.146 +        pEpCtSMIME = 0xa1,
   1.147 +        pEpCtCMS = 0xa2,
   1.148  
   1.149 -		pEpCtStrongEncryption = 0xb0,            // generic
   1.150 -		pEpCtOpenPGP = 0xb8,                     // key at least 2048 bit RSA or EC
   1.151 -		pEpCtOTR = 0xba,
   1.152 +        pEpCtStrongEncryption = 0xb0,            // generic
   1.153 +        pEpCtOpenPGP = 0xb8,                     // key at least 2048 bit RSA or EC
   1.154 +        pEpCtOTR = 0xba,
   1.155  
   1.156 -		// range 0xc0 to 0xff: confirmed encryption and anonymization
   1.157 +        // range 0xc0 to 0xff: confirmed encryption and anonymization
   1.158  
   1.159 -		pEpCtConfirmedEncAnon = 0xc0,            // generic
   1.160 -		pEpCtpEp = 0xff
   1.161 -	} pEpComType;
   1.162 +        pEpCtConfirmedEncAnon = 0xc0,            // generic
   1.163 +        pEpCtpEp = 0xff
   1.164 +    } pEpComType;
   1.165  
   1.166 -	typedef enum pEpStatus {
   1.167 -		pEpStatusOk = 0,
   1.168 +    typedef enum pEpStatus {
   1.169 +        pEpStatusOk = 0,
   1.170  
   1.171 -		pEpInitCannotLoadGpgme = 0x0110,
   1.172 -		pEpInitGpgmeInitFailed = 0x0111,
   1.173 -		pEpInitNoGpgHome = 0x0112,
   1.174 -		pEpInitNetpgpInitFailed = 0x0113,
   1.175 -		pEpInitCannotDetermineGpgVersion = 0x0114,
   1.176 -		pEpInitUnsupportedGpgVersion = 0x0115,
   1.177 -		pEpInitCannotConfigGpgAgent = 0x0116,
   1.178 +        pEpInitCannotLoadGpgme = 0x0110,
   1.179 +        pEpInitGpgmeInitFailed = 0x0111,
   1.180 +        pEpInitNoGpgHome = 0x0112,
   1.181 +        pEpInitNetpgpInitFailed = 0x0113,
   1.182 +        pEpInitCannotDetermineGpgVersion = 0x0114,
   1.183 +        pEpInitUnsupportedGpgVersion = 0x0115,
   1.184 +        pEpInitCannotConfigGpgAgent = 0x0116,
   1.185  
   1.186 -		pEpInitSqlite3WithoutMutex = 0x0120,
   1.187 -		pEpInitCannotOpenDb = 0x0121,
   1.188 -		pEpInitCannotOpenSystemDb = 0x0122,
   1.189 +        pEpInitSqlite3WithoutMutex = 0x0120,
   1.190 +        pEpInitCannotOpenDb = 0x0121,
   1.191 +        pEpInitCannotOpenSystemDb = 0x0122,
   1.192  
   1.193 -		pEpKeyNotFound = 0x0201,
   1.194 -		pEpKeyHasAmbigName = 0x0202,
   1.195 -		pEpGetKeyFailed = 0x0203,
   1.196 -		pEpCannotExportKey = 0x0204,
   1.197 -		pEpCannotEditKey = 0x0205,
   1.198 -		pEpKeyUnsuitable = 0x0206,
   1.199 +        pEpKeyNotFound = 0x0201,
   1.200 +        pEpKeyHasAmbigName = 0x0202,
   1.201 +        pEpGetKeyFailed = 0x0203,
   1.202 +        pEpCannotExportKey = 0x0204,
   1.203 +        pEpCannotEditKey = 0x0205,
   1.204 +        pEpKeyUnsuitable = 0x0206,
   1.205  
   1.206 -		pEpCannotFindIdentity = 0x0301,
   1.207 -		pEpCannotSetPerson = 0x0381,
   1.208 -		pEpCannotSetPgpKeypair = 0x0382,
   1.209 -		pEpCannotSetIdentity = 0x0383,
   1.210 -		pEpCannotSetTrust = 0x0384,
   1.211 -		pEpKeyBlacklisted = 0x0385,
   1.212 -		pEpCannotFindPerson = 0x0386,
   1.213 +        pEpCannotFindIdentity = 0x0301,
   1.214 +        pEpCannotSetPerson = 0x0381,
   1.215 +        pEpCannotSetPgpKeypair = 0x0382,
   1.216 +        pEpCannotSetIdentity = 0x0383,
   1.217 +        pEpCannotSetTrust = 0x0384,
   1.218 +        pEpKeyBlacklisted = 0x0385,
   1.219 +        pEpCannotFindPerson = 0x0386,
   1.220  
   1.221 -		pEpCannotFindAlias = 0x0391,
   1.222 -		pEpCannotSetAlias = 0x0392,
   1.223 +        pEpCannotFindAlias = 0x0391,
   1.224 +        pEpCannotSetAlias = 0x0392,
   1.225  
   1.226 -		pEpUnencrypted = 0x0400,
   1.227 -		pEpVerified = 0x0401,
   1.228 -		pEpDecrypted = 0x0402,
   1.229 -		pEpDecryptedAndVerified = 0x0403,
   1.230 -		pEpDecryptWrongFormat = 0x0404,
   1.231 -		pEpDecryptNoKey = 0x0405,
   1.232 -		pEpDecryptSignatureDoesNotMatch = 0x0406,
   1.233 -		pEpVerifyNoKey = 0x0407,
   1.234 -		pEpVerifiedAndTrusted = 0x0408,
   1.235 -		pEpCannotDecryptUnknown = 0x04ff,
   1.236 +        pEpUnencrypted = 0x0400,
   1.237 +        pEpVerified = 0x0401,
   1.238 +        pEpDecrypted = 0x0402,
   1.239 +        pEpDecryptedAndVerified = 0x0403,
   1.240 +        pEpDecryptWrongFormat = 0x0404,
   1.241 +        pEpDecryptNoKey = 0x0405,
   1.242 +        pEpDecryptSignatureDoesNotMatch = 0x0406,
   1.243 +        pEpVerifyNoKey = 0x0407,
   1.244 +        pEpVerifiedAndTrusted = 0x0408,
   1.245 +        pEpCannotDecryptUnknown = 0x04ff,
   1.246  
   1.247 -		pEpTrustwordNotFound = 0x0501,
   1.248 -		pEpTrustwordsFprWrongLength = 0x0502,
   1.249 -		pEpTrustwordsDuplicateFpr = 0x0503,
   1.250 +        pEpTrustwordNotFound = 0x0501,
   1.251 +        pEpTrustwordsFprWrongLength = 0x0502,
   1.252 +        pEpTrustwordsDuplicateFpr = 0x0503,
   1.253  
   1.254 -		pEpCannotCreateKey = 0x0601,
   1.255 -		pEpCannotSendKey = 0x0602,
   1.256 +        pEpCannotCreateKey = 0x0601,
   1.257 +        pEpCannotSendKey = 0x0602,
   1.258  
   1.259 -		pEpPhraseNotFound = 0x0701,
   1.260 +        pEpPhraseNotFound = 0x0701,
   1.261  
   1.262 -		pEpSendFunctionNotRegistered = 0x0801,
   1.263 -		pEpContraintsViolated = 0x0802,
   1.264 -		pEpCannotEncode = 0x0803,
   1.265 +        pEpSendFunctionNotRegistered = 0x0801,
   1.266 +        pEpContraintsViolated = 0x0802,
   1.267 +        pEpCannotEncode = 0x0803,
   1.268  
   1.269 -		pEpSyncNoNotifyCallback = 0x0901,
   1.270 -		pEpSyncIllegalMessage = 0x0902,
   1.271 -		pEpSyncNoInjectCallback = 0x0903,
   1.272 +        pEpSyncNoNotifyCallback = 0x0901,
   1.273 +        pEpSyncIllegalMessage = 0x0902,
   1.274 +        pEpSyncNoInjectCallback = 0x0903,
   1.275  
   1.276 -		pEpSequenceViolated = 0x0970,
   1.277 -		pEpCannotIncreaseSequence = 0x0971,
   1.278 -		pEpCannotSetSequenceValue = 0x0972,
   1.279 -		pEpOwnSequence = 0x097f,
   1.280 +        pEpSequenceViolated = 0x0970,
   1.281 +        pEpCannotIncreaseSequence = 0x0971,
   1.282 +        pEpCannotSetSequenceValue = 0x0972,
   1.283 +        pEpOwnSequence = 0x097f,
   1.284  
   1.285 -		pEpSyncStatemachineError = 0x0980,
   1.286 -		pEpSyncNoTrust = 0x0981,
   1.287 -		pEpStatemachineInvalidState = 0x0982,
   1.288 -		pEpStatemachineInvalidEvent = 0x0983,
   1.289 -		pEpStatemachineInvalidCondition = 0x0984,
   1.290 -		pEpStatemachineInvalidAction = 0x0985,
   1.291 -		pEpStatemachineInhibitedEvent = 0x0986,
   1.292 +        pEpSyncStatemachineError = 0x0980,
   1.293 +        pEpSyncNoTrust = 0x0981,
   1.294 +        pEpStatemachineInvalidState = 0x0982,
   1.295 +        pEpStatemachineInvalidEvent = 0x0983,
   1.296 +        pEpStatemachineInvalidCondition = 0x0984,
   1.297 +        pEpStatemachineInvalidAction = 0x0985,
   1.298 +        pEpStatemachineInhibitedEvent = 0x0986,
   1.299  
   1.300 -		pEpCommitFailed = 0xff01,
   1.301 -		pEpMessageConsume = 0xff02,
   1.302 -		pEpMessageIgnore = 0xff03,
   1.303 +        pEpCommitFailed = 0xff01,
   1.304 +        pEpMessageConsume = 0xff02,
   1.305 +        pEpMessageIgnore = 0xff03,
   1.306  
   1.307 -		pEpRecordNotFound = -6,
   1.308 -		pEpCannotCreateTempFile = -5,
   1.309 -		pEpIllegalValue = -4,
   1.310 -		pEpBufferTooSmall = -3,
   1.311 -		pEpOutOfMemory = -2,
   1.312 -		pEpUnknownError = -1,
   1.313 +        pEpRecordNotFound = -6,
   1.314 +        pEpCannotCreateTempFile = -5,
   1.315 +        pEpIllegalValue = -4,
   1.316 +        pEpBufferTooSmall = -3,
   1.317 +        pEpOutOfMemory = -2,
   1.318 +        pEpUnknownError = -1,
   1.319  
   1.320 -		pEpVersionMismatch = -7,
   1.321 -	} pEpStatus;
   1.322 +        pEpVersionMismatch = -7,
   1.323 +    } pEpStatus;
   1.324  
   1.325 -	typedef [v1_enum] enum pEpIdentityFlags {
   1.326 -		pEpIdfNone = 0,
   1.327 -		pEpIdfNotForSync = 0x0001,
   1.328 -		pEpIdfList = 0x0002,
   1.329 -		pEpIdfDevicegroup = 0x0100
   1.330 -	} pEpIdentityFlags;
   1.331 +    typedef [v1_enum] enum pEpIdentityFlags {
   1.332 +        pEpIdfNone = 0,
   1.333 +        pEpIdfNotForSync = 0x0001,
   1.334 +        pEpIdfList = 0x0002,
   1.335 +        pEpIdfDevicegroup = 0x0100
   1.336 +    } pEpIdentityFlags;
   1.337  
   1.338 -	[uuid(C3A3814E-567F-4D1C-9F44-9B1DA3957A89)] struct pEpIdentity {
   1.339 -		BSTR Address;
   1.340 -		BSTR Fpr;
   1.341 -		BSTR UserId;
   1.342 -		BSTR UserName;
   1.343 -		pEpComType CommType;
   1.344 -		BSTR Lang;
   1.345 -		VARIANT_BOOL Me;
   1.346 -		pEpIdentityFlags Flags;
   1.347 -	};
   1.348 +    [uuid(C3A3814E-567F-4D1C-9F44-9B1DA3957A89)] struct pEpIdentity {
   1.349 +        BSTR Address;
   1.350 +        BSTR Fpr;
   1.351 +        BSTR UserId;
   1.352 +        BSTR UserName;
   1.353 +        pEpComType CommType;
   1.354 +        BSTR Lang;
   1.355 +        VARIANT_BOOL Me;
   1.356 +        pEpIdentityFlags Flags;
   1.357 +    };
   1.358  
   1.359 -	[id(11)] HRESULT SetIdentityFlags([in] struct pEpIdentity *identity, [in] pEpIdentityFlags flags);
   1.360 -	[id(12)] HRESULT UnsetIdentityFlags([in] struct pEpIdentity *identity, [in] pEpIdentityFlags flags);
   1.361 +    [id(11)] HRESULT SetIdentityFlags([in] struct pEpIdentity *identity, [in] pEpIdentityFlags flags);
   1.362 +    [id(12)] HRESULT UnsetIdentityFlags([in] struct pEpIdentity *identity, [in] pEpIdentityFlags flags);
   1.363  
   1.364 -	// Keymanagement API
   1.365 +    // Keymanagement API
   1.366  
   1.367 -	[id(13)] HRESULT StartKeyserverLookup();
   1.368 -	[id(14)] HRESULT StopKeyserverLookup();
   1.369 +    [id(13)] HRESULT StartKeyserverLookup();
   1.370 +    [id(14)] HRESULT StopKeyserverLookup();
   1.371  
   1.372 -	[id(15)] HRESULT Myself([in] struct pEpIdentity *ident, [out, retval] struct pEpIdentity *result);
   1.373 -	[id(16)] HRESULT UpdateIdentity([in] struct pEpIdentity *ident, [out, retval] struct pEpIdentity *result);
   1.374 -	[id(17)] HRESULT KeyMistrusted([in] struct pEpIdentity *ident);
   1.375 -	[id(18)] HRESULT KeyResetTrust([in] struct pEpIdentity *ident);
   1.376 -	[id(19)] HRESULT TrustPersonalKey([in] struct pEpIdentity *ident, [out, retval] struct pEpIdentity *result);
   1.377 -	[id(20)] HRESULT OwnIdentitiesRetrieve([out, retval] SAFEARRAY(struct pEpIdentity)* ownIdentities);
   1.378 -	// [id(21)] HRESULT UndoLastMistrust(); NOT IMPLEMENTED ANY MORE - USE KeyResetTrust() instead
   1.379 -	[id(22)] HRESULT IspEpUser([in] struct pEpIdentity *ident, [out, retval] VARIANT_BOOL *ispEp);
   1.380 +    [id(15)] HRESULT Myself([in] struct pEpIdentity *ident, [out, retval] struct pEpIdentity *result);
   1.381 +    [id(16)] HRESULT UpdateIdentity([in] struct pEpIdentity *ident, [out, retval] struct pEpIdentity *result);
   1.382 +    [id(17)] HRESULT KeyMistrusted([in] struct pEpIdentity *ident);
   1.383 +    [id(18)] HRESULT KeyResetTrust([in] struct pEpIdentity *ident);
   1.384 +    [id(19)] HRESULT TrustPersonalKey([in] struct pEpIdentity *ident, [out, retval] struct pEpIdentity *result);
   1.385 +    [id(20)] HRESULT OwnIdentitiesRetrieve([out, retval] SAFEARRAY(struct pEpIdentity)* ownIdentities);
   1.386 +    // [id(21)] HRESULT UndoLastMistrust(); NOT IMPLEMENTED ANY MORE - USE KeyResetTrust() instead
   1.387 +    [id(22)] HRESULT IspEpUser([in] struct pEpIdentity *ident, [out, retval] VARIANT_BOOL *ispEp);
   1.388  
   1.389 -	// Blacklist API
   1.390 -	
   1.391 -	[id(23)] HRESULT BlacklistAdd([in] BSTR fpr);
   1.392 -	[id(24)] HRESULT BlacklistDelete([in] BSTR fpr);
   1.393 -	[id(25)] HRESULT BlacklistIsListed([in] BSTR fpr, [out, retval] VARIANT_BOOL *listed);
   1.394 -	[id(26)] HRESULT BlacklistRetrieve([out, retval] SAFEARRAY(BSTR) *blacklist);
   1.395 +    // Blacklist API
   1.396 +    
   1.397 +    [id(23)] HRESULT BlacklistAdd([in] BSTR fpr);
   1.398 +    [id(24)] HRESULT BlacklistDelete([in] BSTR fpr);
   1.399 +    [id(25)] HRESULT BlacklistIsListed([in] BSTR fpr, [out, retval] VARIANT_BOOL *listed);
   1.400 +    [id(26)] HRESULT BlacklistRetrieve([out, retval] SAFEARRAY(BSTR) *blacklist);
   1.401  
   1.402 -	// PGP compatibility functions
   1.403 +    // PGP compatibility functions
   1.404  
   1.405 -	[id(27)] HRESULT OpenPGPListKeyinfo([in] BSTR searchPattern, [out, retval] SAFEARRAY(struct StringPair)* keyinfoList);
   1.406 +    [id(27)] HRESULT OpenPGPListKeyinfo([in] BSTR searchPattern, [out, retval] SAFEARRAY(struct StringPair)* keyinfoList);
   1.407  
   1.408 -	// Message API
   1.409 +    // Message API
   1.410  
   1.411 -	typedef [v1_enum] enum pEpRating {
   1.412 -		pEpRatingUndefined = 0,
   1.413 -		pEpRatingCannotDecrypt,
   1.414 -		pEpRatingHaveNoKey,
   1.415 -		pEpRatingUnencrypted,
   1.416 -		pEpRatingUnencryptedForSome,
   1.417 -		pEpRatingUnreliable,
   1.418 -		pEpRatingReliable,
   1.419 -		pEpRatingTrusted,
   1.420 -		pEpRatingTrustedAndAnonymized,
   1.421 -		pEpRatingFullyAnonymous,
   1.422 +    typedef [v1_enum] enum pEpRating {
   1.423 +        pEpRatingUndefined = 0,
   1.424 +        pEpRatingCannotDecrypt,
   1.425 +        pEpRatingHaveNoKey,
   1.426 +        pEpRatingUnencrypted,
   1.427 +        pEpRatingUnencryptedForSome,
   1.428 +        pEpRatingUnreliable,
   1.429 +        pEpRatingReliable,
   1.430 +        pEpRatingTrusted,
   1.431 +        pEpRatingTrustedAndAnonymized,
   1.432 +        pEpRatingFullyAnonymous,
   1.433  
   1.434 -		pEpRatingMistrust = -1,
   1.435 -		pEpRatingB0rken = -2,
   1.436 -		pEpRatingUnderAttack = -3
   1.437 -	} pEpRating;
   1.438 +        pEpRatingMistrust = -1,
   1.439 +        pEpRatingB0rken = -2,
   1.440 +        pEpRatingUnderAttack = -3
   1.441 +    } pEpRating;
   1.442  
   1.443 -	typedef [v1_enum] enum pEpColor {
   1.444 -		pEpColorNoColor = 0,
   1.445 -		pEpColorYellow,
   1.446 -		pEpColorGreen,
   1.447 -		pEpColorRed = -1,
   1.448 -	} pEpColor;
   1.449 +    typedef [v1_enum] enum pEpColor {
   1.450 +        pEpColorNoColor = 0,
   1.451 +        pEpColorYellow,
   1.452 +        pEpColorGreen,
   1.453 +        pEpColorRed = -1,
   1.454 +    } pEpColor;
   1.455  
   1.456 -	typedef [v1_enum] enum pEpEncryptFlags {
   1.457 -		pEpEncryptFlagDefault = 0,
   1.458 -		pEpEncryptFlagForceEncryption = 0x1,
   1.459 +    typedef [v1_enum] enum pEpEncryptFlags {
   1.460 +        pEpEncryptFlagDefault = 0,
   1.461 +        pEpEncryptFlagForceEncryption = 0x1,
   1.462  
   1.463 -		// This flag is for special uses and should not be used
   1.464 -		// by normal pEp clients!
   1.465 -		pEpEncryptFlagForceUnsigned = 0x2,
   1.466 +        // This flag is for special uses and should not be used
   1.467 +        // by normal pEp clients!
   1.468 +        pEpEncryptFlagForceUnsigned = 0x2,
   1.469  
   1.470 -		// This flag is for special uses and should not be used
   1.471 -		// by normal pEp clients!
   1.472 -		pEpEncryptFlagForceNoAttachedKey = 0x4,
   1.473 +        // This flag is for special uses and should not be used
   1.474 +        // by normal pEp clients!
   1.475 +        pEpEncryptFlagForceNoAttachedKey = 0x4,
   1.476  
   1.477 -		//This is mainly used by pEp clients to send private keys to 
   1.478 -		// their own PGP-only device
   1.479 -		pEpEncryptFlagForceVersion1 = 0x16
   1.480 -	} pEpEncryptFlags;
   1.481 +        //This is mainly used by pEp clients to send private keys to 
   1.482 +        // their own PGP-only device
   1.483 +        pEpEncryptFlagForceVersion1 = 0x16
   1.484 +    } pEpEncryptFlags;
   1.485  
   1.486 -	typedef [v1_enum] enum pEpDecryptFlags {
   1.487 -		pEpDecryptFlagsNone = 0,
   1.488 -		pEpDecryptFlagOwnPrivateKey = 0x1,
   1.489 -		pEpDecryptFlagConsume = 0x2,
   1.490 -		pEpDecryptFlagIgnore = 0x4,
   1.491 -		pEpDecryptFlagSrcModified = 0x8,
   1.492 -		pEpDecryptFlagUntrustedServer = 0x100
   1.493 -	} pEpDecryptFlags;
   1.494 +    typedef [v1_enum] enum pEpDecryptFlags {
   1.495 +        pEpDecryptFlagsNone = 0,
   1.496 +        pEpDecryptFlagOwnPrivateKey = 0x1,
   1.497 +        pEpDecryptFlagConsume = 0x2,
   1.498 +        pEpDecryptFlagIgnore = 0x4,
   1.499 +        pEpDecryptFlagSrcModified = 0x8,
   1.500 +        pEpDecryptFlagUntrustedServer = 0x100
   1.501 +    } pEpDecryptFlags;
   1.502  
   1.503 -	typedef [v1_enum] enum pEpMsgDirection {
   1.504 -		pEpDirIncoming = 0,
   1.505 -		pEpDirOutgoing
   1.506 -	} pEpMsgDirection;
   1.507 +    typedef [v1_enum] enum pEpMsgDirection {
   1.508 +        pEpDirIncoming = 0,
   1.509 +        pEpDirOutgoing
   1.510 +    } pEpMsgDirection;
   1.511  
   1.512 -	typedef [v1_enum] enum pEpEncFormat {
   1.513 -		pEpEncNone = 0,                       // message is not encrypted
   1.514 -		pEpEncPieces,                         // inline PGP + PGP extensions
   1.515 -		pEpEncSMime,                          // RFC5751
   1.516 -		pEpEncPgpMime,                        // RFC3156
   1.517 -		pEpEncPep,                            // pEp encryption format
   1.518 -		pEpEncPgpMimeOutlook1                 // Message B0rken by Outlook type 1
   1.519 -	} pEpEncFormat;
   1.520 +    typedef [v1_enum] enum pEpEncFormat {
   1.521 +        pEpEncNone = 0,                       // message is not encrypted
   1.522 +        pEpEncPieces,                         // inline PGP + PGP extensions
   1.523 +        pEpEncSMime,                          // RFC5751
   1.524 +        pEpEncPgpMime,                        // RFC3156
   1.525 +        pEpEncPep,                            // pEp encryption format
   1.526 +        pEpEncPgpMimeOutlook1                 // Message B0rken by Outlook type 1
   1.527 +    } pEpEncFormat;
   1.528  
   1.529 -	[uuid(47FB0795-6B64-455C-BB0E-54998CAB8ACB)] struct StringPair {
   1.530 -		BSTR Name;
   1.531 -		BSTR Value;
   1.532 -	};
   1.533 +    [uuid(47FB0795-6B64-455C-BB0E-54998CAB8ACB)] struct StringPair {
   1.534 +        BSTR Name;
   1.535 +        BSTR Value;
   1.536 +    };
   1.537  
   1.538 -	[uuid(634EB7CE-99AA-460D-BDF8-F7CDA7232CA6)] struct Blob {
   1.539 -		SAFEARRAY(BYTE) value;
   1.540 -		BSTR MimeType;
   1.541 -		BSTR Filename;
   1.542 -	};
   1.543 +    [uuid(634EB7CE-99AA-460D-BDF8-F7CDA7232CA6)] struct Blob {
   1.544 +        SAFEARRAY(BYTE) value;
   1.545 +        BSTR MimeType;
   1.546 +        BSTR Filename;
   1.547 +    };
   1.548  
   1.549 -	[uuid(B6F40887-E761-4A47-B204-A0193EE0284D)] struct TextMessage {
   1.550 -		pEpMsgDirection Dir;
   1.551 -		BSTR Id;
   1.552 -		BSTR ShortMsg;
   1.553 -		BSTR LongMsg;
   1.554 -		BSTR LongMsgFormatted;
   1.555 -		SAFEARRAY(struct Blob) Attachments;
   1.556 -		hyper Sent; // Timestamp: 64 Bit time_t from mktime(), seconds since January 1, 1970, 0:00 UTC.
   1.557 -		hyper Recv; // Timestamp: 64 Bit time_t from mktime(), seconds since January 1, 1970, 0:00 UTC.
   1.558 -		struct pEpIdentity From;
   1.559 -		SAFEARRAY(struct pEpIdentity) To;
   1.560 -		struct pEpIdentity RecvBy;
   1.561 -		SAFEARRAY(struct pEpIdentity) Cc;
   1.562 -		SAFEARRAY(struct pEpIdentity) Bcc;
   1.563 -		SAFEARRAY(struct pEpIdentity) ReplyTo;
   1.564 -		SAFEARRAY(BSTR) References;
   1.565 -		SAFEARRAY(BSTR) Keywords;
   1.566 -		BSTR Comments;
   1.567 -		SAFEARRAY(struct StringPair) OptFields;
   1.568 -		[readonly] BSTR SenderFpr;
   1.569 -	};
   1.570 +    [uuid(B6F40887-E761-4A47-B204-A0193EE0284D)] struct TextMessage {
   1.571 +        pEpMsgDirection Dir;
   1.572 +        BSTR Id;
   1.573 +        BSTR ShortMsg;
   1.574 +        BSTR LongMsg;
   1.575 +        BSTR LongMsgFormatted;
   1.576 +        SAFEARRAY(struct Blob) Attachments;
   1.577 +        hyper Sent; // Timestamp: 64 Bit time_t from mktime(), seconds since January 1, 1970, 0:00 UTC.
   1.578 +        hyper Recv; // Timestamp: 64 Bit time_t from mktime(), seconds since January 1, 1970, 0:00 UTC.
   1.579 +        struct pEpIdentity From;
   1.580 +        SAFEARRAY(struct pEpIdentity) To;
   1.581 +        struct pEpIdentity RecvBy;
   1.582 +        SAFEARRAY(struct pEpIdentity) Cc;
   1.583 +        SAFEARRAY(struct pEpIdentity) Bcc;
   1.584 +        SAFEARRAY(struct pEpIdentity) ReplyTo;
   1.585 +        SAFEARRAY(BSTR) References;
   1.586 +        SAFEARRAY(BSTR) Keywords;
   1.587 +        BSTR Comments;
   1.588 +        SAFEARRAY(struct StringPair) OptFields;
   1.589 +        [readonly] BSTR SenderFpr;
   1.590 +    };
   1.591  
   1.592 -	[id(28)] HRESULT EncryptMessage(
   1.593 -		[in, out] struct TextMessage *src,
   1.594 -		[out] struct TextMessage * dst,
   1.595 -		[in] SAFEARRAY(BSTR) extra,
   1.596 -		[in, defaultvalue(pEpEncryptFlagDefault)] pEpEncryptFlags flags,
   1.597 -		// Use pEpEncFormat.pEpEncNone for unencrypted, outgoing messages.
   1.598 -		// Default is pEpEncFormat.pEpEncPep, all other formats are only 
   1.599 -		// for compatibility and not intended for normal use.
   1.600 -		[in, defaultvalue(pEpEncPep)] pEpEncFormat encFormat);
   1.601 +    [id(28)] HRESULT EncryptMessage(
   1.602 +        [in, out] struct TextMessage *src,
   1.603 +        [out] struct TextMessage * dst,
   1.604 +        [in] SAFEARRAY(BSTR) extra,
   1.605 +        [in, defaultvalue(pEpEncryptFlagDefault)] pEpEncryptFlags flags,
   1.606 +        // Use pEpEncFormat.pEpEncNone for unencrypted, outgoing messages.
   1.607 +        // Default is pEpEncFormat.pEpEncPep, all other formats are only 
   1.608 +        // for compatibility and not intended for normal use.
   1.609 +        [in, defaultvalue(pEpEncPep)] pEpEncFormat encFormat);
   1.610  
   1.611 -	[id(29)] HRESULT DecryptMessage(
   1.612 -		[in, out] struct TextMessage *src,
   1.613 -		[out] struct TextMessage * dst,
   1.614 -		[in, out] SAFEARRAY(BSTR) *keylist,
   1.615 -		[in, out] pEpDecryptFlags* flags,
   1.616 -		[out, retval] pEpRating *rating);
   1.617 +    [id(29)] HRESULT DecryptMessage(
   1.618 +        [in, out] struct TextMessage *src,
   1.619 +        [out] struct TextMessage * dst,
   1.620 +        [in, out] SAFEARRAY(BSTR) *keylist,
   1.621 +        [in, out] pEpDecryptFlags* flags,
   1.622 +        [out, retval] pEpRating *rating);
   1.623  
   1.624 -	[id(30)] HRESULT OutgoingMessageRating([in] struct TextMessage *msg, [out, retval] pEpRating * pVal);
   1.625 -	[id(31)] HRESULT IdentityRating([in] struct pEpIdentity * ident, [out, retval] pEpRating * pVal);
   1.626 -	[id(32)] HRESULT ColorFromRating([in] pEpRating rating, [out, retval] pEpColor* pVal);
   1.627 +    [id(30)] HRESULT OutgoingMessageRating([in] struct TextMessage *msg, [out, retval] pEpRating * pVal);
   1.628 +    [id(31)] HRESULT IdentityRating([in] struct pEpIdentity * ident, [out, retval] pEpRating * pVal);
   1.629 +    [id(32)] HRESULT ColorFromRating([in] pEpRating rating, [out, retval] pEpColor* pVal);
   1.630  
   1.631 -	[id(33)] HRESULT GetMessageTrustwords(
   1.632 -		[in] struct TextMessage *msg,
   1.633 -		[in] struct pEpIdentity * receivedBy,
   1.634 -		[in] SAFEARRAY(BSTR) keylist,
   1.635 -		[in, defaultvalue("en")] BSTR lang,
   1.636 -		[in, defaultvalue(0)] VARIANT_BOOL full,
   1.637 -		[out, retval] BSTR * words
   1.638 -	);
   1.639 +    [id(33)] HRESULT GetMessageTrustwords(
   1.640 +        [in] struct TextMessage *msg,
   1.641 +        [in] struct pEpIdentity * receivedBy,
   1.642 +        [in] SAFEARRAY(BSTR) keylist,
   1.643 +        [in, defaultvalue("en")] BSTR lang,
   1.644 +        [in, defaultvalue(0)] VARIANT_BOOL full,
   1.645 +        [out, retval] BSTR * words
   1.646 +    );
   1.647  
   1.648 -	[id(34)] HRESULT EncryptMessageForSelf(
   1.649 -		[in] struct pEpIdentity* targetId,
   1.650 -		[in] struct TextMessage* src,
   1.651 -		[in] SAFEARRAY(BSTR) extra, // Fingerprints for extra keys for encryption.
   1.652 -		[out] struct TextMessage* dst,
   1.653 -		[in, defaultvalue(pEpEncryptFlagDefault)] pEpEncryptFlags flags
   1.654 -	);
   1.655 +    [id(34)] HRESULT EncryptMessageForSelf(
   1.656 +        [in] struct pEpIdentity* targetId,
   1.657 +        [in] struct TextMessage* src,
   1.658 +        [in] SAFEARRAY(BSTR) extra, // Fingerprints for extra keys for encryption.
   1.659 +        [out] struct TextMessage* dst,
   1.660 +        [in, defaultvalue(pEpEncryptFlagDefault)] pEpEncryptFlags flags
   1.661 +    );
   1.662  
   1.663 -	[id(35)] HRESULT ReEvaluateMessageRating(
   1.664 -		[in] struct TextMessage *src,
   1.665 -		[in] SAFEARRAY(BSTR) x_KeyList, // referring to X-KeyList mail header
   1.666 -		[in] pEpRating x_EncStatus, // referring to X-EncStatus mail header
   1.667 -		[out, retval] pEpRating *rating
   1.668 -	);
   1.669 +    [id(35)] HRESULT ReEvaluateMessageRating(
   1.670 +        [in] struct TextMessage *src,
   1.671 +        [in] SAFEARRAY(BSTR) x_KeyList, // referring to X-KeyList mail header
   1.672 +        [in] pEpRating x_EncStatus, // referring to X-EncStatus mail header
   1.673 +        [out, retval] pEpRating *rating
   1.674 +    );
   1.675  
   1.676 -	// callback / keysync API
   1.677 -	[id(36)] HRESULT RegisterCallbacks([in] IpEpEngineCallbacks* newCallback);
   1.678 -	[id(37)] HRESULT UnregisterCallbacks();
   1.679 +    // callback / keysync API
   1.680 +    [id(36)] HRESULT RegisterCallbacks([in] IpEpEngineCallbacks* newCallback);
   1.681 +    [id(37)] HRESULT UnregisterCallbacks();
   1.682  
   1.683 -	// mark imported keys as trusted
   1.684 +    // mark imported keys as trusted
   1.685  
   1.686 -	[id(38)] HRESULT SetOwnKey(
   1.687 -		[in] struct pEpIdentity * ident,
   1.688 -		[in] BSTR fpr,
   1.689 -		[out, retval] struct pEpIdentity * result
   1.690 -	);
   1.691 +    [id(38)] HRESULT SetOwnKey(
   1.692 +        [in] struct pEpIdentity * ident,
   1.693 +        [in] BSTR fpr,
   1.694 +        [out, retval] struct pEpIdentity * result
   1.695 +    );
   1.696  
   1.697 -	[id(39)] HRESULT EncryptMessageAndAddPrivKey(
   1.698 -		[in] struct TextMessage *src,
   1.699 -		[out] struct TextMessage * dst,
   1.700 -		[in] BSTR to_fpr,
   1.701 -		[in, defaultvalue(pEpEncryptFlagDefault)] pEpEncryptFlags flags,
   1.702 -		// Use pEpEncFormat.pEpEncNone for unencrypted, outgoing messages.
   1.703 -		// Default is pEpEncFormat.pEpEncPep, all other formats are only 
   1.704 -		// for compatibility and not intended for normal use.
   1.705 -		[in, defaultvalue(pEpEncPep)] pEpEncFormat encFormat);
   1.706 +    [id(39)] HRESULT EncryptMessageAndAddPrivKey(
   1.707 +        [in] struct TextMessage *src,
   1.708 +        [out] struct TextMessage * dst,
   1.709 +        [in] BSTR to_fpr,
   1.710 +        [in, defaultvalue(pEpEncryptFlagDefault)] pEpEncryptFlags flags,
   1.711 +        // Use pEpEncFormat.pEpEncNone for unencrypted, outgoing messages.
   1.712 +        // Default is pEpEncFormat.pEpEncPep, all other formats are only 
   1.713 +        // for compatibility and not intended for normal use.
   1.714 +        [in, defaultvalue(pEpEncPep)] pEpEncFormat encFormat);
   1.715  
   1.716 -	// Trigger an immediate update check.
   1.717 -	[id(40)] HRESULT UpdateNow([in] BSTR productCode, [out] VARIANT_BOOL *didUpdate);
   1.718 +    // Trigger an immediate update check.
   1.719 +    [id(40)] HRESULT UpdateNow([in] BSTR productCode, [out] VARIANT_BOOL *didUpdate);
   1.720  
   1.721 -	// Get a preview of the outgoint message rating
   1.722 -	[id(41)] HRESULT OutgoingMessageRatingPreview([in] struct TextMessage *msg, [out, retval] pEpRating *rating);
   1.723 +    // Get a preview of the outgoint message rating
   1.724 +    [id(41)] HRESULT OutgoingMessageRatingPreview([in] struct TextMessage *msg, [out, retval] pEpRating *rating);
   1.725  
   1.726 -	// Trust own public key. To be used for manual key import.
   1.727 -	[id(42)] HRESULT TrustOwnKey([in] struct pEpIdentity * ident);
   1.728 +    // Trust own public key. To be used for manual key import.
   1.729 +    [id(42)] HRESULT TrustOwnKey([in] struct pEpIdentity * ident);
   1.730  
   1.731 -	// Engine startup and shutdown
   1.732 -	[id(43)] HRESULT Startup();
   1.733 +    // Engine startup and shutdown
   1.734 +    [id(43)] HRESULT Startup();
   1.735  
   1.736 -	// Get the rating for a specific key
   1.737 -	[id(44)] HRESULT GetKeyRatingForUser([in] BSTR userId, [in] BSTR fpr, [out, retval] pEpRating *rating);
   1.738 +    // Get the rating for a specific key
   1.739 +    [id(44)] HRESULT GetKeyRatingForUser([in] BSTR userId, [in] BSTR fpr, [out, retval] pEpRating *rating);
   1.740  
   1.741 -	// Resets the database status for a key
   1.742 -	[id(45)] HRESULT KeyResetIdentity([in] struct pEpIdentity ident, [in] BSTR fpr);
   1.743 +    // Resets the database status for a key
   1.744 +    [id(45)] HRESULT KeyResetIdentity([in] struct pEpIdentity ident, [in] BSTR fpr);
   1.745  
   1.746 -	// Resets the default database status for the user / keypair provided
   1.747 -	[id(46)] HRESULT KeyResetUser([in] BSTR userId, [in] BSTR fpr);
   1.748 +    // Resets the default database status for the user / keypair provided
   1.749 +    [id(46)] HRESULT KeyResetUser([in] BSTR userId, [in] BSTR fpr);
   1.750  
   1.751 -	// revoke and mistrust all own keys, generate new keys for all own identities, and opportunistically communicate
   1.752 -	// key reset information to people we have recently contacted. 
   1.753 -	[id(47)] HRESULT KeyResetAllOwnKeys();
   1.754 +    // revoke and mistrust all own keys, generate new keys for all own identities, and opportunistically communicate
   1.755 +    // key reset information to people we have recently contacted. 
   1.756 +    [id(47)] HRESULT KeyResetAllOwnKeys();
   1.757  
   1.758 -	// sync API
   1.759 +    // sync API
   1.760  
   1.761 -	typedef [v1_enum] enum SyncHandshakeResult {
   1.762 -		SyncHandshakeCancel = -1,
   1.763 -		SyncHandshakeAccepted = 0,
   1.764 -		SyncHandshakeRejected = 1
   1.765 -	} SyncHandshakeResult;
   1.766 +    typedef [v1_enum] enum SyncHandshakeResult {
   1.767 +        SyncHandshakeCancel = -1,
   1.768 +        SyncHandshakeAccepted = 0,
   1.769 +        SyncHandshakeRejected = 1
   1.770 +    } SyncHandshakeResult;
   1.771  
   1.772 -	[id(48)] HRESULT DeliverHandshakeResult([in] enum SyncHandshakeResult result, [in] SAFEARRAY(struct pEpIdentity) identities_sharing);
   1.773 +    [id(48)] HRESULT DeliverHandshakeResult([in] enum SyncHandshakeResult result, [in] SAFEARRAY(struct pEpIdentity) identities_sharing);
   1.774  
   1.775 -	// Imports keys from data
   1.776 -	[id(49)] HRESULT ImportKey([in] BSTR keyData, [out] SAFEARRAY(struct pEpIdentity)* privateKeys);
   1.777 +    // Imports keys from data
   1.778 +    [id(49)] HRESULT ImportKey([in] BSTR keyData, [out] SAFEARRAY(struct pEpIdentity)* privateKeys);
   1.779  
   1.780 -	typedef [v1_enum] enum pEpCipherSuite {
   1.781 -		pEpCipherSuiteDefault = 0,
   1.782 -		pEpCipherSuiteCV25519 = 1,
   1.783 -		pEpCipherSuiteP256 = 2,
   1.784 -		pEpCipherSuiteP384 = 3,
   1.785 -		pEpCipherSuiteP521 = 4,
   1.786 -		pEpCipherSuiteRSA2K = 5,
   1.787 -		pEpCipherSuiteRSA3K = 6,
   1.788 -		pEpCipherSuiteRSA4K = 7,
   1.789 -		pEpCipherSuiteRSA8K = 8
   1.790 -	} pEpCipherSuite;
   1.791 +    typedef [v1_enum] enum pEpCipherSuite {
   1.792 +        pEpCipherSuiteDefault = 0,
   1.793 +        pEpCipherSuiteCV25519 = 1,
   1.794 +        pEpCipherSuiteP256 = 2,
   1.795 +        pEpCipherSuiteP384 = 3,
   1.796 +        pEpCipherSuiteP521 = 4,
   1.797 +        pEpCipherSuiteRSA2K = 5,
   1.798 +        pEpCipherSuiteRSA3K = 6,
   1.799 +        pEpCipherSuiteRSA4K = 7,
   1.800 +        pEpCipherSuiteRSA8K = 8
   1.801 +    } pEpCipherSuite;
   1.802  
   1.803 -	// Sets the cipher suite
   1.804 -	[id(50)] HRESULT ConfigCipherSuite([in, defaultvalue(pEpCipherSuiteDefault)] pEpCipherSuite cipherSuite);
   1.805 +    // Sets the cipher suite
   1.806 +    [id(50)] HRESULT ConfigCipherSuite([in, defaultvalue(pEpCipherSuiteDefault)] pEpCipherSuite cipherSuite);
   1.807  
   1.808 -	// Leave the device group
   1.809 -	[id(51)] HRESULT LeaveDeviceGroup();
   1.810 +    // Leave the device group
   1.811 +    [id(51)] HRESULT LeaveDeviceGroup();
   1.812  
   1.813 -	// Get Trustwords for a pair of fprs
   1.814 -	[id(52)] HRESULT GetTrustwordsForFprs([in] BSTR fpr1, [in] BSTR fpr2, [in, defaultvalue("en")] BSTR lang, [in, defaultvalue(0)] VARIANT_BOOL full, [out, retval] BSTR * words);
   1.815 +    // Get Trustwords for a pair of fprs
   1.816 +    [id(52)] HRESULT GetTrustwordsForFprs([in] BSTR fpr1, [in] BSTR fpr2, [in, defaultvalue("en")] BSTR lang, [in, defaultvalue(0)] VARIANT_BOOL full, [out, retval] BSTR * words);
   1.817  
   1.818 -	// Get the comm type a bare key has
   1.819 -	[id(53)] HRESULT GetKeyRating([in] BSTR fpr, [out, retval] pEpComType *commType);
   1.820 +    // Get the comm type a bare key has
   1.821 +    [id(53)] HRESULT GetKeyRating([in] BSTR fpr, [out, retval] pEpComType *commType);
   1.822  
   1.823 -	// Decode a Sync message from PER into XER
   1.824 -	[id(54)] HRESULT PERToXERSyncMessage([in] struct TextMessage *msg, [out, retval] BSTR *xer);
   1.825 +    // Decode a Sync message from PER into XER
   1.826 +    [id(54)] HRESULT PERToXERSyncMessage([in] struct TextMessage *msg, [out, retval] BSTR *xer);
   1.827  
   1.828 -	// Disable Sync for this identity
   1.829 -	[id(55)] HRESULT DisableIdentityForSync([in] struct pEpIdentity * ident);
   1.830 +    // Disable Sync for this identity
   1.831 +    [id(55)] HRESULT DisableIdentityForSync([in] struct pEpIdentity * ident);
   1.832  
   1.833 -	// Enable Sync for this identity
   1.834 -	[id(56)] HRESULT EnableIdentityForSync([in] struct pEpIdentity * ident);
   1.835 +    // Enable Sync for this identity
   1.836 +    [id(56)] HRESULT EnableIdentityForSync([in] struct pEpIdentity * ident);
   1.837  
   1.838 -	// Gets the directory where shared files are stored
   1.839 -	[id(57)] HRESULT PerMachineDirectory([out, retval] BSTR *directory);
   1.840 +    // Gets the directory where shared files are stored
   1.841 +    [id(57)] HRESULT PerMachineDirectory([out, retval] BSTR *directory);
   1.842  
   1.843 -	// Gets the directory for user files
   1.844 +    // Gets the directory for user files
   1.845      [id(58)] HRESULT PerUserDirectory([out, retval] BSTR *directory);
   1.846  
   1.847      // Converts a comm type to a pEp rating